Problem of warmup_ratio #9268
Replies: 3 comments
-
This is because the log shows the LR at the 50th iteration rather than the first iteration. |
Beta Was this translation helpful? Give feedback.
-
Set x1=1, y1=0.001*0.1 (the learning rate of the first iteration), x2=1000, y2=0.01 (the initial learning rate), so the function of linear warmming up is y = 9.91*10^(-6)*x + 9.009*10^(-5). So when x=50 (the 50th iteration), the learning rate y should be 5.8559*10^(-4), which is different from the one in the log, why? |
Beta Was this translation helpful? Give feedback.
-
The calculation is implemented here: https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/hooks/lr_updater.py#L87 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
master branch https://github.com/open-mmlab/mmdetection
Environment
python3
Reproduces the problem - code sample
The warmup_ratio means "the ratio of the starting learning rate used for warmup". But I find that if I set the lr to 0.1 and warmup_ratio to 0.001, the actual starting learning rate used for warmup is not 0.001 * 0.1, why? How to caculate the actual starting learning rate?

Reproduces the problem - command or script
None
Reproduces the problem - error message
None
Additional information
None
Beta Was this translation helpful? Give feedback.
All reactions