Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Created October 13, 2019 23:34
Show Gist options
  • Select an option

  • Save GeorgeSeif/389db8081dceaaee0b01bc224c82bf54 to your computer and use it in GitHub Desktop.

Select an option

Save GeorgeSeif/389db8081dceaaee0b01bc224c82bf54 to your computer and use it in GitHub Desktop.
(train_images, train_labels), (test_images, test_labels) = datasets.mnist.load_data()
class_names = ['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight', 'nine']
plt.figure(figsize=(10,10))
for i in range(16):
plt.subplot(4, 4, i+1)
plt.xticks([])
plt.yticks([])
plt.imshow(train_images[i], cmap=plt.cm.binary)
plt.xlabel(class_names[train_labels[i]])
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment