pytorch-gradual-warmup-lr
pytorch-gradual-warmup-lr copied to clipboard
Fix: epoch does not increase after finishing warming up
After the warming up phase, executing scheduler_warmup.step()
does not affect scheduler_warmup.last_epoch
Since in scheduler_warmup.step
, either epoch is None or not, self.after_scheduler.step
updates self.after_scheduler.last_epoch
instead of self.last_epoch
. And it is reasonable to add self.total_epoch + 1
to make epochs seem to be continuing.