pub trait LrScheduler {
// Required methods
fn step(&mut self) -> f64;
fn current_lr(&self) -> f64;
fn current_step(&self) -> u64;
fn reset(&mut self);
fn set_step(&mut self, step: u64);
}Expand description
Trait for learning rate schedulers.
Each call to step() advances the internal counter and returns the new LR.
Required Methods§
Sourcefn current_lr(&self) -> f64
fn current_lr(&self) -> f64
Get the current learning rate without advancing.
Sourcefn current_step(&self) -> u64
fn current_step(&self) -> u64
Get the current step count.