当前位置:网站首页>torch使用总结
torch使用总结
2022-07-29 12:24:00 【流黄蛋】
使用tensorflow时候没有考虑过这个事情,今天读代码发现torch还有这样一个重要的语句,记录学习一下:
- model.train()
启用 BatchNormalization 和 Dropout - model.eval()
不启用 BatchNormalization 和 Dropout
训练完 train 样本后,生成的模型 model 要用来测试样本。在 model(test) 之前,需要加上model.eval(),否则只要有输入数据,即使不训练,model 也会改变权值。这是model中含有的 batch normalization 层所带来的的性质。
转载自:https://zhuanlan.zhihu.com/p/208233193
边栏推荐
- mongo根据时间字段进行时间格式化并进行统计
- 微信H5网页分享只显示链接处理办法
- html+css+php+mysql实现注册+登录+修改密码(附完整代码)
- Chapter ten find and record the REST API
- DBeaver 安装及配置离线驱动
- JS advanced four (map, reduce, filter, sort, arrow function, class inheritance, yield)
- MySQL 视图(详解)
- 3D激光SLAM:LeGO-LOAM论文解读---硬件系统部分
- influxdb2的使用
- piglit_get_gl_enum_from_name 参数遍历
猜你喜欢

Interceptors and filters (3) @interface custom annotation interception

Container is changed | deploy MySQL cluster in the Rancher

Chapter 6 c + + primer notes 】 【 function

XSS Vulnerability Analysis

DBeaver 安装及配置离线驱动

Paddle frame experience evaluation and exchange meeting, the use experience of the product is up to you!

【微信小程序】WXSS和全局、页面配置

TiDB upgrade share with case (TiDB v4.0.1 to v5.4.1)

我和 TiDB 的故事 | TiDB 对我不离不弃,我亦如此

MySql 5.7.38下载安装教程 ,并实现在Navicat操作MySql
随机推荐
命里有时终须有--记与TiDB的一次次擦肩而过
第二章总结
【多线程】——深入理解线程中断方式(interrupt)
【多线程】——synchronized关键字
"Pure theory" FPN (Feature Pyramid Network)
WordPress 编辑用户
TiCDC迁移-TiDB到MySQL测试
金仓数据库KingbaseES客户端编程接口指南-ODBC(6. KingbaseES ODBC 的扩展属性)
【云原生】开源数据分析 SPL 轻松应对 T+0
IO流:节点流和处理流详细归纳。
WPF 截图控件之绘制方框与椭圆(四) 「仿微信」
DVWA全级别通关教程
PHP 基础知识
TiDB升级与案例分享(TiDB v4.0.1 → v5.4.1)
飞桨框架体验评测交流会,产品的使用体验由你来决定!
WordPress 版本更新
The IDEA of Database plug-in Database Navigator plug-in
Distributed Configuration Center of Infrastructure
TiCDC同步延迟问题处理
Wu En teacher machine learning course notes 6 logistic regression