Last active
October 17, 2020 12:15
-
-
Save satishgunjal/0f69b4a8ca9d96c96a4084606989c8d7 to your computer and use it in GitHub Desktop.
Plot the test images from 'test_list', their predicted labels, and the true labels.
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 test images from 'test_list', their predicted labels, and the true labels. | |
# Color correct predictions in green and incorrect predictions in red. | |
test_list= [16, 17, 22, 23, 24, 25, 39, 40, 41, 42, 48, 49, 50, 51] | |
num_rows = 7 | |
num_cols = 2 | |
num_images = num_rows * num_cols | |
#plt.figure(figsize=(2*2*num_cols, 2*num_rows)) | |
plt.figure(figsize=(10,14)) | |
for i in range(num_images): | |
plt.subplot(num_rows, 2*num_cols, 2*i+1) | |
plot_image(test_list[i], predictions[test_list[i]], test_labels, test_images) | |
plt.subplot(num_rows, 2*num_cols, 2*i+2) | |
plot_value_array(test_list[i], predictions[test_list[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