当前位置:网站首页>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
边栏推荐
- 【云原生】微服务之Feign的介绍与使用
- mysql5.7.35安装配置教程【超级详细安装教程】
- WordPress 版本更新
- The IDEA of Database plug-in Database Navigator plug-in
- Chapter ten find and record the REST API
- The adb for mysql in what platform for development
- 金仓数据库 KingbaseES 客户端编程接口指南 - ODBC 驱动使用
- Go简单实现协程池
- npm出现报错 npm WARN config global `--global`, `--local` are deprecated. Use `--location=global
- 最简单的共享列表服务器KissLists
猜你喜欢

Chapter ten find and record the REST API

Mysql进阶优化篇01——四万字详解数据库性能分析工具(深入、全面、详细,收藏备用)

容器化 | 在 Rancher 中部署 MySQL 集群

【云原生】开源数据分析 SPL 轻松应对 T+0

3D Laser SLAM: Interpretation of LeGO-LOAM Papers---Hardware System Part

记账APP:小哈记账3——登录页面的制作

mysql数据库安装(详细)

How is the JVM memory model allocated?

MySql string splitting realizes the split function (field splitting, column switching, row switching)

MLX90640 infrared thermal imaging temperature measuring sensor module development notes (9)
随机推荐
容器化 | 在 Rancher 中部署 MySQL 集群
How is the JVM memory model allocated?
【云原生】开源数据分析 SPL 轻松应对 T+0
Wu En 07 regularization of teacher machine learning course notes
The strategy pattern replacement if the else
Interceptors and filters (3) @interface custom annotation interception
MySQL八股文背诵版
js进阶四(map、reduce、filter、sort、箭头函数、class继承、yield)
PD 源码分析- Checker: region 健康卫士
MySQL常用的日期时间函数
WordPress 常规设置
DAY 25 丨 daily SQL clock 】 【 o team number [difficult medium]
Based article 】 【 learn with Rust | Rust, variables and data types
3D激光SLAM:LeGO-LOAM论文解读---硬件系统部分
[GO语言基础] 一.为什么我要学习Golang以及GO语言入门普及
mysql数据库安装(详细)
MLX90640 红外热成像仪测温传感器模块开发笔记(九)
JVM内存模型如何分配的?
DAY 22 丨 daily SQL clock 】 【 the average selling price of the difficulty of medium 】
PHP 基础知识