Skip to content

jwprescott/pytorch-lr-scheduler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pytorch-lr-scheduler

Bring some LR schedulers from Keras to PyTorch. This repo currently includes ReduceLROnPlateau.

See also: https://github.com/Jiaming-Liu/pytorch/tree/LR-Scheduler

Demo of ReduceLROnPlateau:

optimizer = torch.optim.SGD(model.parameters(), lr=0.1, momentum=0.9)
scheduler = ReduceLROnPlateau(optimizer, 'min') # set up scheduler
for epoch in range(10):
    train(...)
    val_acc, val_loss = validate(...)
    scheduler.step(val_loss, epoch) # update lr if needed

About

Bring some LR schedulers from Keras to PyTorch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%