Cannot import lr scheduler

I have pytorch compiled from master and it shows no changes to pull.

But I get error on importing lr_scheduler (https://github.com/pytorch/pytorch/pull/1370) .

Is there some way to access it ?

How are you importing it?
from torch.optim.lr_scheduler import LambdaLR, StepLR, MultiStepLR, ExponentialLR, ReduceLROnPlateau works for me.

1 Like

I used conda / pip install on version 0.2.0_4. I faced the same issue. Code line - “from . import lr_scheduler” was missing in the __ init __.py in the optim folder. I added it and after that I was able to import it.

1 Like