Skip to content

Instantly share code, notes, and snippets.

@okdolly-001
Last active April 3, 2018 03:03
Show Gist options
  • Save okdolly-001/d47c99bc8249323cb659ffa944d7266f to your computer and use it in GitHub Desktop.
Save okdolly-001/d47c99bc8249323cb659ffa944d7266f to your computer and use it in GitHub Desktop.
TensorFlow beginner #tensorflow
correct_prediction = tf.equal(tf.argmax(logits, 1), tf.argmax(labels, 1))
#tf.argmax finds the index of the largest value along axis = 1.tf.equal checks whether the two are equal, if the output index (predicted classes are the same, then correct prediction is 1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment