Comments (4)
请问,效果不好,是最终的效果不好,还是说开始的效果不好?
请问其他关于lr以及优化器的参数方便提供一下吗?并且baseline相关的参数也可以提供。
from adan.
请问,效果不好,是最终的效果不好,还是说开始的效果不好?
请问其他关于lr以及优化器的参数方便提供一下吗?并且baseline相关的参数也可以提供。
adan使用lr=0.001,betas=(0.98, 0.92, 0.99),最终map会降低1%左右。
绿色是baseline使用的SGD,lr=0.01,momentum=0.999。当我的模型中backbone使用THU的纯卷积搭建的重参数化Repvit时,使用adan=0.01在训练中途直接NAN。是否是因为RepDWConv?
from adan.
应该不是DWconv的问题,看样子Adan像过拟合了。可以尝试:
- 加一点weight_decay: weight_decay=0.01
- 或者grad_clip: max_grad_norm=1.0或者0.5或者0.1
- 调整beta3: betas=(0.98, 0.92, 0.999),你也可以试着调整beta1,Adan的beta1等价于Adam的beta1或者SGD的momentum。不过我的经验是,Adan beta1不是特别敏感。
- 可以引入Warmup lr的机制,将lr逐步增大到你想要的值。
个人觉得前3条能解决你的问题。
另外,SGD的momentum用0.999的话,很奇怪,0.999基本上是完全抛弃了后边的梯度。大部分SGD的momentum都在0.9-0.95之间。
from adan.
应该不是DWconv的问题,看样子Adan像过拟合了。可以尝试:
- 加一点weight_decay: weight_decay=0.01
- 或者grad_clip: max_grad_norm=1.0或者0.5或者0.1
- 调整beta3: betas=(0.98, 0.92, 0.999),你也可以试着调整beta1,Adan的beta1等价于Adam的beta1或者SGD的momentum。不过我的经验是,Adan beta1不是特别敏感。
- 可以引入Warmup lr的机制,将lr逐步增大到你想要的值。
个人觉得前3条能解决你的问题。
另外,SGD的momentum用0.999的话,很奇怪,0.999基本上是完全抛弃了后边的梯度。大部分SGD的momentum都在0.9-0.95之间。
十分感谢您的建议!我试着尝试一下
from adan.
Related Issues (20)
- Training yolov5 model appears nan HOT 6
- Suggestions for applying to visual dense prediction tasks. HOT 6
- HumanEval shall not be used for training. HOT 1
- OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. HOT 12
- Some questions about learning rate. HOT 7
- GPU type and GPU nums and total training time on Transformer-XL, GPT-2 HOT 2
- processing data for BERT experiment HOT 4
- module 'fused_adan' has no attribute 'adan_multi_tensor' HOT 1
- Gradient clipping option in DeepSpeed HOT 1
- Deepspeed Integration HOT 4
- Restarting strategy HOT 4
- Adan相比于SGD在前 74 epochs保持领先,但是后续收敛变慢,我改如何调整lr等超参数? HOT 2
- Concrete weight decay configuration for GPT-2 pretraining HOT 1
- How to implement Adan optimizer in Yolov7? HOT 1
- Settings for instruction-tuning HOT 2
- About the pre-trained model HOT 1
- RuntimeError: The detected CUDA version (12.2) mismatches the version that was used to compile PyTorch (11.8). HOT 2
- Install Error HOT 4
- 如何设置Adan学习率 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adan.