摘要: 1 1 history = model.fit() 2 2 3 3 def plot_acc_loss_curve(history): 4 4 # 显示训练集和验证集的acc和loss曲线 5 5 from matplotlib import pyplot as plt 6 6 acc = hist 阅读全文
posted @ 2020-05-06 23:09 WWBlog 阅读(5739) 评论(0) 推荐(0) 编辑
摘要: 1 import tensorflow as tf 2 import os 3 import numpy as np 4 from matplotlib import pyplot as plt 5 6 7 np.set_printoptions(threshold=np.inf) 8 9 10 m 阅读全文
posted @ 2020-05-06 23:04 WWBlog 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 1 import tensorflow as tf 2 import os 3 4 5 mnist = tf.keras.datasets.mnist 6 (x_train, y_train), (x_test, y_test) = mnist.load_data() 7 x_train, x_te 阅读全文
posted @ 2020-05-06 22:23 WWBlog 阅读(182) 评论(0) 推荐(0) 编辑
摘要: #注意训练时间较长,建议在google colab上计算。 1 import tensorflow as tf 2 from tensorflow.keras.preprocessing.image import ImageDataGenerator 3 4 mnist = tf.keras.dat 阅读全文
posted @ 2020-05-06 21:19 WWBlog 阅读(404) 评论(0) 推荐(0) 编辑