博客
关于我
可视化_将两条曲线画在一个图中
阅读量:382 次
发布时间:2019-03-05

本文共 1280 字,大约阅读时间需要 4 分钟。

# 我们来显示验证和训练的损失曲线(见图 6-20)。# # 代码清单 6-38 绘制结果import matplotlib.pyplot as pltloss = history.history['loss']val_loss = history.history['val_loss']epochs = range(len(loss))plt.figure()plt.plot(epochs, loss, 'bo', label='Training loss')plt.plot(epochs, val_loss, 'b', label='Validation loss')plt.title('Training and validation loss')plt.legend()plt.show()# 图 6-20 简单的密集连接网络在耶拿温度预测任务上的训练损失和验证损失print(history.history)

在这里插入图片描述

print(history.history){   'val_loss': [0.8748725497482347, 0.3975294645299217, 0.3109697792993953, 0.32736822754454703, 0.32925783149578325, 0.3136130665345372, 0.3221883660155713, 0.3522020755638459, 0.32485968480552746, 0.3193821293605862, 0.3482952474704877, 0.34307795770766675, 0.32300440624104365, 0.3191545883966283, 0.33410712029247197, 0.34500235922256745, 0.3459017112153559, 0.35247658667855825, 0.3340611231497577, 0.3364521464519445], 'loss': [1.571558004796505, 0.4991003686189652, 0.3011927672326565, 0.2678608466684818, 0.25595426523685455, 0.24517172515392305, 0.23824044767022132, 0.23298490041494369, 0.22821045821905137, 0.2227226406633854, 0.2185874055325985, 0.21574989056587218, 0.21279067119956016, 0.210872103959322, 0.20845433309674263, 0.20609600335359574, 0.20415313729643822, 0.20333791476488114, 0.20114947184920312, 0.19921788474917412]}

转载地址:http://gmrg.baihongyu.com/

你可能感兴趣的文章
mysql 如何给SQL添加索引
查看>>
mysql 字段区分大小写
查看>>
mysql 字段合并问题(group_concat)
查看>>
mysql 字段类型类型
查看>>
MySQL 字符串截取函数,字段截取,字符串截取
查看>>
MySQL 存储引擎
查看>>
mysql 存储过程 注入_mysql 视图 事务 存储过程 SQL注入
查看>>
MySQL 存储过程参数:in、out、inout
查看>>
mysql 存储过程每隔一段时间执行一次
查看>>
mysql 存在update不存在insert
查看>>
Mysql 学习总结(86)—— Mysql 的 JSON 数据类型正确使用姿势
查看>>
Mysql 学习总结(87)—— Mysql 执行计划(Explain)再总结
查看>>
Mysql 学习总结(88)—— Mysql 官方为什么不推荐用雪花 id 和 uuid 做 MySQL 主键
查看>>
Mysql 学习总结(89)—— Mysql 库表容量统计
查看>>
mysql 实现主从复制/主从同步
查看>>
mysql 审核_审核MySQL数据库上的登录
查看>>
mysql 导入 sql 文件时 ERROR 1046 (3D000) no database selected 错误的解决
查看>>
mysql 导入导出大文件
查看>>
MySQL 导出数据
查看>>
mysql 将null转代为0
查看>>