Trait LearningRateScheduler

Source
pub trait LearningRateScheduler {
    // Required methods
    fn get_lr(&mut self, epoch: usize, base_lr: f64) -> f64;
    fn reset(&mut self);
    fn name(&self) -> &'static str;
}
Expand description

Learning rate scheduler trait for adaptive learning rate adjustment during training

Required Methods§

Source

fn get_lr(&mut self, epoch: usize, base_lr: f64) -> f64

Get the learning rate for the current epoch

Source

fn reset(&mut self)

Reset the scheduler state (useful for multiple training runs)

Source

fn name(&self) -> &'static str

Get the name of the scheduler for logging

Implementors§