CosineDecayLR
CosineDecayLR¶
class modelzoo.common.pytorch.optim.lr_scheduler.CosineDecayLR
(optimizer: torch.optim.optimizer.Optimizer, initial_learning_rate: float, end_learning_rate: float, decay_steps: int, disable_lr_steps_reset: bool = False)
Applies the cosine decay schedule as described in https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/schedules/CosineDecay
- Parameters:
optimizer – The optimizer to schedule
initial_learning_rate – The initial learning rate
end_learning_rate – The final learning rate
decay_steps – Number of steps to perform the decay