Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Learning rate scheduler broken #50

Closed
kyleliang919 opened this issue Dec 17, 2022 · 2 comments
Closed

Learning rate scheduler broken #50

kyleliang919 opened this issue Dec 17, 2022 · 2 comments

Comments

@kyleliang919
Copy link

the code is calling sched.step() without epoch number, which causes the learning rate to increase rapidly essentially without warmup.
https://github.com/pytorch/pytorch/blob/master/torch/optim/lr_scheduler.py

@crowsonkb
Copy link
Owner

The LR scheduler in train.py is being used in the per step mode rather than per epoch, which means the warmup and decay are expressed in terms of numbers of steps rather than numbers of epochs (I train a lot on huge datasets and sometimes don't actually get through one epoch). You need to use a much slower warmup than you would if it were expressed in terms of epochs.

@kyleliang919
Copy link
Author

Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants