Puzzled by TensorFlow nn.in_top_k output
<p>I modified <a href="https://www.tensorflow.org/versions/r0.11/tutorials/deep_cnn/index.html" rel="nofollow noreferrer">tensorflow convnet tutorial</a>
to train just two classes. </p>

<p>Then I evaluated the model using <a href="https://github.com/tensorflow/tensorflow/blob/r0.11/tensorflow/models/image/cifar10/cifar10_eval.py" rel="nofollow noreferrer">cifar10_eval.py</a></p>

<p>I tried to understand the output of <a href="https://www.tensorflow.org/versions/r0.11/api_docs/python/nn.html#in_top_k" rel="nofollow noreferrer">tf.nn.in_top_k</a></p>

<p>L128    top_k_op = tf.nn.in_top_k(logits, labels, 1)</p>

<p>which is printed out as:</p>

<p>in_top_k output:::
<code>[array([ True, False,  True, False,  True,  True,  True,  True,  True,  True], dtype=bool)]</code></p>

<p>while the true labels(two classes, 10 images) are:::
<code>[0 1 1 1 1 1 1 1 1 0]</code></p>

<p>and the logits are:::</p>

<pre><code>[[ 1.45472026 -1.46666598]
 [-1.0181191   1.03441548]
 [-1.02658665  1.04306769]
 [-1.19205511  1.21065331]
 [-1.22167087  1.24064851]
 [-0.89583808  0.91119087]
 [-0.17517655  0.18206072]
 [-0.09379113  0.09957675]
 [-1.05578279  1.07254183]
 [ 0.73048806 -0.73411369] ]
</code></pre>

<p>Question: Why the second and fourth <code>nn.in_top_k()</code> output are <code>False</code> instead of <code>True</code>? </p>