立即学习:https://edu.csdn.net/course/play/26266/326662?utm_source=blogtoedu
60000训练集/10000测试集
格式 28X28
通道数 1灰度图
数据集 tensorflow.keras.datasets dir()
mnist数据集加载
mnist = tensorflow.keras.datasets.mnist
mnist.load_data()
(x_train, y_train), (x_test, y_test) = mnist.load_data()
print(x_train.shape)
print(y_train.shape)
print(x_test.shape)
print(y_test.shape)
x_train 表示图片
y_train 表示标签
导入数据集可视化库
import matplotlib.pyplot as plt
conda install -p /Users/zhangkaiyang/anaconda3/envs/tf2.0.0rc1 matplotlib -y
image_index = 123
print(y_train[image_index])
plt.imshow(x_train[image_Index], cmap = 'Greys')