Cyclic Learning Rate


Do we have implementation of cyclic learning rate for torch.optim.lr_scheduler?


You can get it here, in class CyclicLR :


The function “torch.optim.lr_scheduler.CyclicLR” does not work in pytorch 1.0.1.
It says there the function is not defined

The function was added after 1.0.1 was released.
You could install the nightly build from here to get the method.

1 Like

i install the nightly version, but there is still “ImportError: cannot import name ‘CyclicLR’”

Could you print the PyTorch version you are using with print(torch.__version__)?
Also, could you post the line of code you are using to import CyclicLR?
I tested it two days ago and it was working.

thanks for your reply, is there something wrong with my import?

1.0.1.post2 is not the nightly build.
Nightly build will contain the date in the version number, e.g. 1.1.0.dev20190422.

it works now, thank you so much