Tony-Y / pytorch_warmup

Learning Rate Warmup in PyTorch
https://tony-y.github.io/pytorch_warmup/
MIT License
392 stars 25 forks source link

UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. #5

Closed Mao-KU closed 3 years ago

Mao-KU commented 3 years ago

Hi Tony, I am using torch1.9 and lr_scheduler.step(lr_scheduler.last_epoch + 1), but I got this UserWarning: UserWarning: The epoch parameter in scheduler.step() was not necessary and is being deprecated where possible. Please use scheduler.step() to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available.

Will this lead to some learning rate bugs?

Tony-Y commented 3 years ago

You should ignore the warning because we need the closed form to use this library (pytorch_warmup).

This comment might be helpful: https://github.com/Tony-Y/pytorch_warmup/pull/1#issuecomment-735620983

Mao-KU commented 3 years ago

I see. Thanks for the reply!