当前位置:网站首页>Torch optimizer small parsing
Torch optimizer small parsing
2022-07-07 05:17:00 【Fun of construction】
I press torch 1.11 Version written :
With sgd For example :
Inside maximize = group[‘maximize’] Illustrates the maxmize Parameters can be divided group Appoint . Of course, it can also be used globally , also maxmize yes sgd Unique ( By 1.11 edition )
Be careful , Other versions of optimizer such as adam, I didn't see it maxmize Parameters . Want to perform gradient rise , My idea is to rewrite the optimizer .
Be careful ,self.param_groups It's a list , Is defined in the base class ,sgd Can't find in the . As can be seen from the picture above ,sgd Is in accordance with the self.param_groups To each params Perform gradient optimization ( Up or down )
Be careful sgd init Methods defaults Variable , This is for the base class init Methodical . of super, You can see b Stand a video , It's very detailed :
Back to base class , Pay attention to defaults notes :
The dictionary is used in the back setdefault Method to set the global default defaults For each group:
边栏推荐
- Longest non descent subsequence (LIS) (dynamic programming)
- Inventory host list in ansible (I wish you countless flowers and romance)
- AOSP ~Binder 通信原理 (一) - 概要
- AOSP ~binder communication principle (I) - Overview
- 一个酷酷的“幽灵”控制台工具
- np.random.shuffle与np.swapaxis或transpose一起时要慎用
- Addressable 预下载
- 2039: [蓝桥杯2022初赛] 李白打酒加强版 (动态规划)
- Ansible报错:“msg“: “Invalid/incorrect password: Permission denied, please try again.“
- Development thoughts of adding new requirements in secondary development
猜你喜欢
随机推荐
Leetcode longest public prefix
Using thread class and runnable interface to realize the difference between multithreading
《四》表单
记录一次压测经验总结
精彩速递|腾讯云数据库6月刊
The execution order of return in JS' try catch finally
Liste des hôtes d'inventaire dans ansible (je vous souhaite des fleurs et de la romance sans fin)
Development thoughts of adding new requirements in secondary development
[question] Compilation Principle
第一篇论文的写作流程
接口间调用为什么要用json、fastjson怎么赋值的、fastjson [email protected]映射关系问题
IMS data channel concept of 5g vonr+
【PHP SPL笔记】
window定时计划任务
Window scheduled tasks
腾讯云数据库公有云市场稳居TOP 2!
Understand common network i/o models
动态生成表格
Stm32f103ze+sht30 detection of ambient temperature and humidity (IIC simulation sequence)
Salesforce 容器化 ISV 场景下的软件供应链安全落地实践