Closed kyleliang919 closed 1 year ago
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.
Thanks for the clarification.
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