Created
November 17, 2021 18:50
-
-
Save mohammedouahman/e5027ef8f1ab4ca11a853ab3d739f0ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plot the first X test images, their predicted labels, and the true labels. | |
# Color correct predictions in blue and incorrect predictions in red. | |
num_rows = 5 | |
num_cols = 3 | |
num_images = num_rows*num_cols | |
plt.figure(figsize=(2*2*num_cols, 2*num_rows)) | |
for i in range(num_images): | |
plt.subplot(num_rows, 2*num_cols, 2*i+1) | |
plot_image(i, predictions[i], test_labels, test_images) | |
plt.subplot(num_rows, 2*num_cols, 2*i+2) | |
plot_value_array(i, predictions[i], test_labels) | |
plt.tight_layout() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment