Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@VedPDubey
Created July 9, 2021 06:11
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 VedPDubey/58d2b4fee5c6b9d827c2e37a1f96bdb3 to your computer and use it in GitHub Desktop.
Save VedPDubey/58d2b4fee5c6b9d827c2e37a1f96bdb3 to your computer and use it in GitHub Desktop.
test_pred = model.predict(test_images)
test_pred = np.argmax(test_pred,axis=1)
test_actual = np.argmax(test_labels,axis=1)
rnd_idx = random.sample(range(0,400),8)
class_labels = {i:class_name for (class_name,i) in class_name_labels.items()}
for i,idx in enumerate(rnd_idx):
plt.imshow(test_images[idx])
plt.title("Actual: {}\nPredicted: {}".format(class_labels[test_actual[idx]],class_labels[test_pred[idx]]))
plt.grid(None)
plt.show()
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment