注释是日语的是因为在日本上学发表用的,懒得改了
从keras的dataset导出图像
使用卷积神经网络训练
model为28*28输入--卷积层--最大池化层--卷积层--最大池化层--全连接层1600个输入-中间层64个--10个输出
#mnist_test
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import datasets, layers, models
import matplotlib.pyplot as plt
from google.colab import drive
import numpy as np
# データを読み込む
(train_images, train_labels), (test_images, test_labels) = keras.datasets.fashion_mnist.load_data()
class_names = ['T-shirt', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot'