博客
关于我
可视化_将两条曲线画在一个图中
阅读量: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事务与锁机制
查看>>
MTTR、MTBF、MTTF的大白话理解
查看>>
mt_rand
查看>>
mysql -存储过程
查看>>
mysql /*! 50100 ... */ 条件编译
查看>>
mudbox卸载/完美解决安装失败/如何彻底卸载清除干净mudbox各种残留注册表和文件的方法...
查看>>
mysql 1264_关于mysql 出现 1264 Out of range value for column 错误的解决办法
查看>>
mysql 1593_Linux高可用(HA)之MySQL主从复制中出现1593错误码的低级错误
查看>>
mysql 5.6 修改端口_mysql5.6.24怎么修改端口号
查看>>
MySQL 8.0 恢复孤立文件每表ibd文件
查看>>
MySQL 8.0开始Group by不再排序
查看>>
mysql ansi nulls_SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON 什么意思
查看>>
multi swiper bug solution
查看>>
MySQL Binlog 日志监听与 Spring 集成实战
查看>>
MySQL binlog三种模式
查看>>
multi-angle cosine and sines
查看>>
Mysql Can't connect to MySQL server
查看>>
mysql case when 乱码_Mysql CASE WHEN 用法
查看>>
Multicast1
查看>>
mysql client library_MySQL数据库之zabbix3.x安装出现“configure: error: Not found mysqlclient library”的解决办法...
查看>>