GenericLinearSchedulerWithLinearWarmup
- class lightning_ir.schedulers.schedulers.GenericLinearSchedulerWithLinearWarmup(num_warmup_steps: int, num_training_steps: int, *args, final_value: float = 0.0, num_delay_steps: int = 0, **kwargs)[source]
Bases:
LinearSchedulerWithLinearWarmup
,GenericScheduler
- __init__(num_warmup_steps: int, num_training_steps: int, *args, final_value: float = 0.0, num_delay_steps: int = 0, **kwargs) None
Scheduler for linearly decreasing values with linear warmup.
- Parameters:
num_warmup_steps (int) – Number of warmup steps
num_training_steps (int) – Number of training steps
final_value (float, optional) – The final value that should be reached at the end of decay, defaults to 0.0
num_delay_steps (int, optional) – Number of steps to delay warmup / decay, defaults to 0
Methods
Attributes
- on_train_batch_start(trainer: Trainer, pl_module: LightningModule, batch: Any, batch_idx: int) None
Called when the train batch begins.
- on_train_start(trainer: Trainer, pl_module: LightningIRModule) None
Called when the train begins.