Skip to content
masterclass Buddy

PyTorch · Class

lr_scheduler.StepLR

StepLR changes an optimizer's learning rate at fixed epoch intervals. It multiplies the rate by gamma every step_size epochs.

Last updated

Syntax

StepLR(torch::optim::Optimizer& optimizer, unsigned step_size, double gamma = 0.1)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • LRScheduler
  • ReduceLROnPlateauScheduler
  • ExponentialLR
  • torch::optim::Optimizer

Source: Learning Rate Schedulers — PyTorch main documentation. Checked 2026-11-03.