Closed songyuc closed 2 years ago
yoloe没有设置weight_decay
https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.4/configs/ppyoloe/_base_/optimizer_300e.yml#L13 如果你想改的话在这里写上 weight_decay: xxx
yoloe没有设置weight_decay
如果你想改的话在这里写上 weight_decay: xxx
那PP-YOLOE-S用的是SGD函数中weight_decay的默认值吗?
https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.4/configs/ppyoloe/_base_/optimizer_300e.yml#L17 这里的scale_factor是除了AdamW外的优化器的weight_decay
https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.4/configs/ppyoloe/base/optimizer_300e.yml#L17 这里的scale_factor是除了AdamW外的优化器的weight_decay 我有点晕了,PP-YOLOE用的不是带有weight_decay的SGD优化器吗?
@songyuc 看下代码https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.4/ppdet/optimizer.py#L286
@songyuc 看下代码https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.4/ppdet/optimizer.py#L286
老师,您好,我们看了一下代码发现:
根据代码,PP-YOLOE-s使用的优化器是Momentum
,对应的是API -- paddle.optimizer.Momentum
,我的问题是:paddle.optimizer.Momentum
是否是指带有momentum的SGD算法呢?,这一点我不是很清楚,因为API文档似乎中并没有详细解释Momentum
优化器的算法来源?
笔记:L2-regularization和weight_decay的确是等效的。
期待您的解答!
- momentum = sgd with momentum
- l2_factor等效于weight_decay, 除了AdamW算法
感谢您的解答!
We really appreciate PaddleDetection team for your brilliant work~
Checklist:
描述问题/Describe the bug
请问一下,PP-YOLOE-s的weight_decay参数是在哪里设置的呢? 我在PP-YOLOE的代码文件夹里面搜索了一下,好像没有看到“weight_decay”的相关设置; 期待您的回复!
如果您的issue是关于安装或环境,您可以先查询安装文档尝试解决~
If your issue looks like an installation issue / environment issue, please first try to solve it yourself with the instructions in https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.1/docs/tutorials/INSTALL.md