I just updated my pytorch from 0.2.0 to 1.0rc, but when I try to import the learning rate scheduler by
from torch.optim import lr_scheduler
I got the error “ImportError: cannot import name ‘lr_scheduler’”
where is it now?
I just updated my pytorch from 0.2.0 to 1.0rc, but when I try to import the learning rate scheduler by
from torch.optim import lr_scheduler
I got the error “ImportError: cannot import name ‘lr_scheduler’”
where is it now?
It’ still there in torch.optim
. It works for me:
>>> import torch
>>> torch.__version__
'1.0.0'
>>> from torch.optim import lr_scheduler
also the docs shows it in torch.optim
: https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate