keras官网
https://keras.io/
fashion-mnist文档
https://github.com/zalandoresearch/fashion-mnist
tensorflow文档
https://tensorflow.google.cn/tutorials/keras/basic_classification
代码
其中load_data模块看日记15
import tensorflow as tf
from tensorflow import keras
import numpy as np
import matplotlib.pyplot as plt
import load_data
def plot_image(i, predictions_array, true_label, img):
predictions_array, true_label, img = predictions_array[i], true_label[i], img[i]
plt.grid(False)
plt.xticks([])
plt.yticks([])
plt.imshow(img, cmap=plt.cm.binary)
predicted_label = np.argmax(predictions_array)
if predicted_label == true_label:
color = ‘blue’