xlnstorch.optim.lr_scheduler.LNSLinearLR#
- class xlnstorch.optim.lr_scheduler.LNSLinearLR(optimizer, start_factor=0.3333333333333333, end_factor=1.0, total_iters=0, last_epoch=-1)#
An LNS learning rate scheduler that sets the learning rate of each parameter group to a linearly decaying value.
See also:
torch.optim.lr_scheduler.LinearLR- Parameters:
optimizer (LNSOptimizer) – Wrapped optimizer.
start_factor (float | LNSTensor) – The initial factor for the learning rate.
end_factor (float | LNSTensor) – The final factor for the learning rate.
total_iters (int, optional) – The number of iterations over which the learning rate will decay. Default: 0.
last_epoch (int, optional) – The index of last epoch. Default: -1.
- __init__(optimizer, start_factor=0.3333333333333333, end_factor=1.0, total_iters=0, last_epoch=-1)#
Methods