title: Evaluating softmax (classification) accuracy in Tensorflow with round or argmax?
body: <h1>Problem</h1>
  
  <p>I tried to make a softmax classifier with Tensorflow and predict with <code>tf.argmax()</code>. I found out that one of <code>y_</code> is always higher than 0.5, and I've used <code>tf.round()</code> instead of <code>tf.argmax()</code>.</p>
  
  <p>However, the gap of accuracy between those two methods is about 20% - the accuracy with <code>tf.round()</code> is higher than <code>tf.argmax()</code>.</p>
  
  <p>I expected the accuracy of those two methods should be exactly the same or that <code>tf.round()</code> should be lower than <code>tf.argmax()</code>, but it's not. Does anyone know why this is the case?</p>
  
  <h1>Y and y_<br></h1>
  
  <pre><code>Y=[[1,0,0],
  [0,1,0],
  [0,0,1], ......]  : One-hot (target)
  
  y_=[[0.92, 0.4, 0.4],
  [0.2,0.6,0.2],
  [0.2,0.4,0.2], ......] : output of softmax
  </code></pre>
  
  <h1>Correct prediction</h1>
  
  <pre><code>correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(y_, 1))
  
  correct_prediction = tf.equal(tf.round(y), tf.round(y_))
  </code></pre>
  
  <h1>Accuracy</h1>
  
  <pre><code>accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
  </code></pre>