1,25张图片

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()

2,两张图片

i = 0
plt.figure(figsize=(6,3))
plt.subplot(1,2,1)
plot_image(i, predictions, test_labels, test_images)
plt.subplot(1,2,2)
plot_value_array(i, predictions, test_labels)
plt.show()

相关文章:

  • 2021-06-10
  • 2021-08-16
  • 2021-07-17
  • 2021-07-09
  • 2021-09-25
  • 2021-08-10
  • 2021-05-08
  • 2022-12-23
猜你喜欢
  • 2022-02-04
  • 2021-12-02
  • 2022-01-07
  • 2021-06-16
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
相关资源
相似解决方案