update_learning_rate
python
update_learning_rate(optimizer: torch.optim.Optimizer, lr_schedule: Schedule, step: int) -> floatUpdate the optimizer's learning rate based on the current schedule.
Parameters:
optimizer(Optimizer) – The optimizer to update.lr_schedule(Schedule) – The learning-rate schedule.step(int) – The current step to evaluate the schedule at.
Returns:
float– The updated learning rate.