博客
关于我
可视化_将两条曲线画在一个图中
阅读量: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 基础架构
查看>>
MySQL 基础模块的面试题总结
查看>>
MySQL 处理插入重主键唯一键重复值办法
查看>>
MySQL 备份 Xtrabackup
查看>>
mysql 复杂查询_mysql中复杂查询
查看>>
mYSQL 外键约束
查看>>
mysql 多个表关联查询查询时间长的问题
查看>>
mySQL 多个表求多个count
查看>>
mysql 多字段删除重复数据,保留最小id数据
查看>>
MySQL 多表联合查询:UNION 和 JOIN 分析
查看>>
MySQL 大数据量快速插入方法和语句优化
查看>>
mysql 如何给SQL添加索引
查看>>
mysql 字段区分大小写
查看>>
mysql 字段合并问题(group_concat)
查看>>
mysql 字段类型类型
查看>>
MySQL 字符串截取函数,字段截取,字符串截取
查看>>
MySQL 存储引擎
查看>>
mysql 存储过程 注入_mysql 视图 事务 存储过程 SQL注入
查看>>
MySQL 存储过程参数:in、out、inout
查看>>
mysql 存储过程每隔一段时间执行一次
查看>>