model.summary()
#绘制acc-loss曲线
import matplotlib.pyplot as plt
plt.plot(hist.history['loss'],color='r')
plt.plot(hist.history['val_loss'],color='g')
plt.plot(hist.history['acc'],color='b')
plt.plot(hist.history['val_acc'],color='k')
plt.title('model loss and acc')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train_loss', 'test_loss','train_acc', 'test_acc'], loc='upper left')
plt.show()

如何根据keras的fit后返回的history绘制loss acc曲线

 

相关文章:

  • 2021-10-08
  • 2021-08-09
  • 2021-05-09
  • 2021-11-12
  • 2021-05-15
  • 2021-07-05
  • 2022-12-23
  • 2021-12-16
猜你喜欢
  • 2021-07-04
  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
相关资源
相似解决方案