plt.figure(figsize=(10,10))
for i in range(25):
plt.subplot(5,5,i+1)
//plt.subplot(a,b,i+1) a*b>=25
plt.xticks([])
plt.yticks([])
plt.grid(False)
plt.imshow(train_images[i], cmap=plt.cm.binary)
plt.xlabel(class_names[train_labels[i]])
plt.show()
原文:https://www.cnblogs.com/augustone/p/10505533.html