当前位置:网站首页>PyTorch 9. 优化器
PyTorch 9. 优化器
2022-04-23 06:11:00 【DCGJ666】
PyTorch 9. 优化器
优化器
pytorch优化器:管理并更新模型中可学习参数的值,使得模型输出更接近真实标签
基本属性:
defaults: 优化器超参数
state: 参数的缓存,如momentum的缓存
param_groups: 管理的参数组
_step_count:记录更新次数,学习率调整中使用
操作:
zero_grad():清空所管理参数的梯度
step():执行一步更新
add_param_group():添加参数组
state_dict():获取优化器当前状态信息字典
load_state_dict():加载状态信息字典
- nn.optim.SGD
主要参数:
params:管理的参数组
lr:初始学习率
momentum:动量系数
weight_decay:L2正则化系数
nesterov:是否采用NAG,涅斯捷罗夫梯度优化方法 - nn.optim.Adagrad
自适应学习率梯度下降法 - nn.optim.RMSprop
Adagrad的改进 - nn.optim.Adam
RMSprop结合Momentum - nn.optim.AdamW
增加权重的adam
版权声明
本文为[DCGJ666]所创,转载请带上原文链接,感谢
https://blog.csdn.net/DCGJ666/article/details/121570643
边栏推荐
- 【点云系列】 A Rotation-Invariant Framework for Deep Point Cloud Analysis
- Mysql database installation and configuration details
- 【点云系列】DeepMapping: Unsupervised Map Estimation From Multiple Point Clouds
- 【2021年新书推荐】Practical Node-RED Programming
- DCMTK(DCM4CHE)与DICOOGLE协同工作
- 如何对多维矩阵进行标准化(基于numpy)
- torch_geometric学习一,MessagePassing
- 第2章 Pytorch基础2
- N states of prime number solution
- [point cloud series] a rotation invariant framework for deep point cloud analysis
猜你喜欢

Gee configuring local development environment

【点云系列】Multi-view Neural Human Rendering (NHR)
![[recommendation of new books in 2021] enterprise application development with C 9 and NET 5](/img/1d/cc673ca857fff3c5c48a51883d96c4.png)
[recommendation of new books in 2021] enterprise application development with C 9 and NET 5

Use originpro express for free

Machine learning III: classification prediction based on logistic regression

Chapter 5 fundamentals of machine learning

【点云系列】点云隐式表达相关论文概要

【2021年新书推荐】Professional Azure SQL Managed Database Administration

ThreadLocal,看我就够了!

【点云系列】PnP-3D: A Plug-and-Play for 3D Point Clouds
随机推荐
1.2 preliminary pytorch neural network
Fill the network gap
[3D shape reconstruction series] implicit functions in feature space for 3D shape reconstruction and completion
WebView displays a blank due to a certificate problem
Migrating your native/mobile application to Unified Plan/WebRTC 1.0 API
【动态规划】杨辉三角
[dynamic programming] Yang Hui triangle
第3章 Pytorch神经网络工具箱
MySQL数据库安装与配置详解
[2021 book recommendation] effortless app development with Oracle visual builder
第8章 生成式深度学习
Gobang games
MySQL notes 4_ Primary key auto_increment
Write a wechat double open gadget to your girlfriend
电脑关机程序
Cancel remote dependency and use local dependency
WebRTC ICE candidate里面的raddr和rport表示什么?
树莓派:双色LED灯实验
PyMySQL连接数据库
[Point Cloud Series] SG - Gan: Adversarial Self - attachment GCN for Point Cloud Topological parts Generation