0

我看到了这段代码(非常流行和高质量的代码)

https://www.tensorflow.org/tutorials/generation/dcgan

我想取出模型的学习过程,这意味着我想看到准确度和损失的图表但是我没有成功

在这段代码中,我在哪里提取模型的历史记录

像这样的代码:

print(history_num_1.history.keys())
plt.plot(history_num_1.history['accuracy'])
plt.plot(history_num_1.history['val_accuracy'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.ylim(0,2)

plt.xlabel('epoch')
plt.legend(['train', 'Val'], loc='upper left')

plt.show()
plt.plot(history_num_1.history['loss'])
plt.plot(history_num_1.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.ylim(0,2)
plt.xlabel('epoch')
plt.legend(['train', 'Val'], loc='upper left')

plt.show()

tnx

4

0 回答 0