Skip to main content

LRScheduler

Trait LRScheduler 

Source
pub trait LRScheduler {
    // Required methods
    fn get_lr(&self) -> f32;
    fn step(&mut self);
}
Expand description

Learning rate scheduler trait

Required Methods§

Source

fn get_lr(&self) -> f32

Get the current learning rate

Source

fn step(&mut self)

Step the scheduler (typically called after each epoch or batch)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§