tensorflow2.0 手写数字识别

tensorflow2.0 手写数字识别

import tensorflow as tf
import matplotlib.pyplot as plt

(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
print(x_train.shape)
print(y_train.shape)
print(x_test.shape)
print(y_test.shape)

plt.figure(figsize=(12,12))
for i in range(36):
    plt.subplot(6,6,i+1)
    plt.xticks([])
    plt.yticks([])
    plt.grid(False)
    plt.imshow(x_train[i])
    plt.xlabel(y_train[i])
plt.show()









个人资料
hadoop迷
等级:6
文章:30篇
访问:2.2w
排名: 13
上一篇: tensorflow2.0 网络模型保存为yaml
下一篇:tensorflow2.0 手写数字识别训练、预测
标签: mnist、tensorflow、手写数字识别、面试题
隐藏