Skip to main content

LrSchedulerV2

Trait LrSchedulerV2 

Source
pub trait LrSchedulerV2: Send {
    // Required methods
    fn step(&mut self) -> f64;
    fn current_lr(&self) -> f64;
    fn reset(&mut self);
    fn steps_taken(&self) -> usize;

    // Provided method
    fn completed_cycle(&self) -> bool { ... }
}
Expand description

Trait for learning rate schedulers.

Required Methods§

Source

fn step(&mut self) -> f64

Advance one step and return the new learning rate.

Source

fn current_lr(&self) -> f64

Return the current learning rate without advancing.

Source

fn reset(&mut self)

Reset the scheduler to its initial state.

Source

fn steps_taken(&self) -> usize

Total number of steps taken.

Provided Methods§

Source

fn completed_cycle(&self) -> bool

Whether the scheduler has completed a cycle (if applicable).

Implementors§