PyTorch 2 · Training and saving
Schedule the learning rate
Reduce the learning rate over time. Call scheduler.step() once per epoch.
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=10)
Official PyTorch 2 documentation
PyTorch 2 · Training and saving
Reduce the learning rate over time. Call scheduler.step() once per epoch.
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=10)
Official PyTorch 2 documentation
Was this page helpful?