bp神经网络训练损失函数画图
(2020-03-21 11:03:48)
标签:
it教育 |
分类: Python与机器学习 |
history = model.fit(x_test,y_test, validation_split=0.25,
epochs=1000, batch_size=20, verbose=1)
# 绘制训练 & 验证的准确率值
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.title('Model accuracy')
plt.ylabel('Accuracy')
plt.xlabel('Epoch')
plt.legend(['Train', 'Test'], loc='upper left')
plt.show()