espnet2.schedulers.piecewise_linear_warmup_lr.PiecewiseLinearWarmupLR
Less than 1 minute
espnet2.schedulers.piecewise_linear_warmup_lr.PiecewiseLinearWarmupLR
class espnet2.schedulers.piecewise_linear_warmup_lr.PiecewiseLinearWarmupLR(optimizer: Optimizer, warmup_steps_list: List[float | int] = [0, 25000], warmup_lr_list: List[float] = [0.0, 0.001], last_epoch: int = -1)
Bases: _LRScheduler, AbsBatchStepScheduler
The PiecewiseLinearWarmupLR scheduler
This scheduler is similar to WarmupLR Scheduler except that the warmup stage is piecewise linear.
get_lr()
Compute the next learning rate for each of the optimizer’s param_groups.
- Returns: A
listof learning rates for each of the optimizer’sparam_groupswith the same types as their currentgroup["lr"]s. - Return type: list[float | Tensor]
NOTE
If you’re trying to inspect the most recent learning rate, use get_last_lr() instead.
NOTE
The returned Tensors are copies, and never alias the optimizer’s group["lr"]s.
