Skip to content

Instantly share code, notes, and snippets.

@rafalpronko
Created February 11, 2019 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafalpronko/3af8f090e8c5b51c940aa385746cac23 to your computer and use it in GitHub Desktop.
Save rafalpronko/3af8f090e8c5b51c940aa385746cac23 to your computer and use it in GitHub Desktop.
test_images_tf = test_images_tf.reshape(test_images_tf.shape[0],
test_images_tf.shape[1],
test_images_tf.shape[2], 1)
predictions = modeltf.predict(test_images_tf)
correct = 0
for i, pred in enumerate(predictions):
if np.argmax(pred) == test_labels_tf[i]:
correct += 1
print('Test Accuracy of the model on the {} test images: {}%'.format(test_images_tf.shape[0],
100 * correct/test_images_tf.shape[0]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment