Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created September 5, 2019 07:02
Show Gist options
  • Save NMZivkovic/3db0f7d9fdcf3a17d064afa06b1af706 to your computer and use it in GitHub Desktop.
Save NMZivkovic/3db0f7d9fdcf3a17d064afa06b1af706 to your computer and use it in GitHub Desktop.
predictions = model.predict(X_test)
plt.figure(figsize=(28, 28))
for i in range(5):
ax = plt.subplot(2, 10, i + 1)
plt.imshow(X_test[i, :, :, 0], cmap='gray')
original = y_test[i]
predicted = np.argmax(predictions[i])
plt.title("Original: {}\nPredicted: {}".format(original, predicted), loc='left')
plt.axis('off')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment