Trait burn::lr_scheduler::LrScheduler
pub trait LrScheduler: Send + Sync {
type Record<B: Backend>: Record<B>;
// Required methods
fn step(&mut self) -> f64;
fn to_record<B>(&self) -> Self::Record<B>
where B: Backend;
fn load_record<B>(self, record: Self::Record<B>) -> Self
where B: Backend;
}
Expand description
Learning rate scheduler defines how the learning rate will evolve during training.
Required Associated Types§
Required Methods§
fn step(&mut self) -> f64
fn step(&mut self) -> f64
Perform the scheduler step, potentially updating its state, and returning the effective learning rate.
fn to_record<B>(&self) -> Self::Record<B>where
B: Backend,
fn to_record<B>(&self) -> Self::Record<B>where
B: Backend,
Get the current state of the scheduler as a record.
fn load_record<B>(self, record: Self::Record<B>) -> Selfwhere
B: Backend,
fn load_record<B>(self, record: Self::Record<B>) -> Selfwhere
B: Backend,
Load the state of the scheduler as a record.
Object Safety§
This trait is not object safe.