之所以想显示一下图片,是因为老觉得不看到图片,心里就没底,代码如下(在 ipython 中运行):
import tensorflow as tf
from matplotlib import pyplot as plt
mnist = tf.keras.datasets.mnist
(train_data, train_label), (test_data, test_label) = mnist.load_data()
plt.imshow(train_data[0])
之所以想显示一下图片,是因为老觉得不看到图片,心里就没底,代码如下(在 ipython 中运行):
import tensorflow as tf
from matplotlib import pyplot as plt
mnist = tf.keras.datasets.mnist
(train_data, train_label), (test_data, test_label) = mnist.load_data()
plt.imshow(train_data[0])