ExponentialLR
- class torch.optim.lr_scheduler.ExponentialLR(optimizer, gamma, last_epoch=-1)
Decays the learning rate of each parameter group by gamma every epoch.
When last_epoch=-1, sets initial lr as lr.
- Parameters:
() – Wrapped optimizer.
Decays the learning rate of each parameter group by gamma every epoch.
When last_epoch=-1, sets initial lr as lr.
() – Wrapped optimizer.
gamma (float) – Multiplicative factor of learning rate decay.
last_epoch (int) – The index of last epoch. Default: -1.
>>> scheduler = ExponentialLR(optimizer, gamma=0.95)
>>> for epoch in range(100):
>>> train(...)
>>> validate(...)
>>> scheduler.step()

Compute the next learning rate for each of the optimizer’s
param_groups.
Multiplies the current group["lr"]s in the optimizer’s
param_groups by gamma.
Load the scheduler’s state.
state_dict (dict) – scheduler state. Should be an object returned
from a call to state_dict().
Step the scheduler.
epoch (int, optional) –