我正在使用Kashgari来训练LSTM模型。如何绘制每一步的测试/val精度和损失历史?我知道Kashgari的tensorboard有功能,但我想用matplotlib可视化。对于keras,我使用以下代码来可视化:
def plot_metrics(history):
# summarize history for accuracy
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.title('model accuracy')
plt.ylabel('acc')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
# summarize history for loss
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
有可能用喀什喀里模式来实现这一点吗
目前没有回答
相关问题 更多 >
编程相关推荐