Skip to content

Instantly share code, notes, and snippets.

@KananMahammadli
Created August 29, 2021 22:29
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 KananMahammadli/bbdf9961387e3ec4b39e3364ce51455b to your computer and use it in GitHub Desktop.
Save KananMahammadli/bbdf9961387e3ec4b39e3364ce51455b to your computer and use it in GitHub Desktop.
# decoding the labels
predicted_labels = decoder(model.predict(test_images))
test_labels = decoder(test_labels)
row = 3
col = 4
fig, axes = plt.subplots(row, col, figsize=(16, 12))
c = 0
count = 0
for i in range(row):
for j in range(col):
axes[i][j].imshow(test_images[c])
axes[i][j].set_title(f'Predicted: {predicted_labels[c]}', fontsize=14)
axes[i][j].set_xlabel(f'Actual: {test_labels[c]}', fontsize=14)
if (predicted_labels[c] != test_labels[c]):
count+=1
c += 80
plt.tight_layout()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment