Keras可视化(loss、accuracy)代码

history = model.fit(x_train, y_train,
          epochs=10000,
          batch_size=128)

score = model.evaluate(x_test, y_test, batch_size=128)

print(history.history.keys())

plt.plot(history.history['loss'])
plt.plot(history.history['accuracy'])
plt.show()
发布了72 篇原创文章 · 获赞 3 · 访问量 872

猜你喜欢

转载自blog.csdn.net/weixin_39025679/article/details/104860287
今日推荐