【发布时间】:2021-05-31 12:39:21
【问题描述】:
我的笔记本中已经训练了一个 Tensorflow 模型,我想在此之后绘制准确度和损失。
这是我的代码:
myGene = trainGenerator(2,'/content/data/membrane/train','image','label',
data_gen_args,save_to_dir = None)
model = unet()
model_checkpoint = ModelCheckpoint('unet_membrane.hdf5',
monitor='loss',verbose=1, save_best_only=True)
model.fit_generator(myGene,steps_per_epoch=2000,
epochs=5,callbacks=[model_checkpoint])
有没有办法绘制任何东西?
因为我尝试了matplotlib,但它不起作用。
import matplotlib.pyplot as plt
plt.plot(history['accuracy'])
plt.plot(history['loss'])
【问题讨论】:
标签: python tensorflow metrics