Skip to main content

LrScheduler

Trait LrScheduler 

pub trait LrScheduler:
    LrSchedulerClone
    + Send
    + Sync {
    // Required methods
    fn step(&mut self) -> f64;
    fn to_record(&self) -> LrSchedulerRecord;
    fn load_record(&mut self, record: LrSchedulerRecord);
}
Expand description

Learning rate scheduler defines how the learning rate will evolve during training.

Required Methods§

fn step(&mut self) -> f64

Perform the scheduler step, potentially updating its state, and returning the effective learning rate.

fn to_record(&self) -> LrSchedulerRecord

Get the current state of the scheduler as a record.

fn load_record(&mut self, record: LrSchedulerRecord)

Load the state of the scheduler from a record.

Trait Implementations§

§

impl Clone for Box<dyn LrScheduler>

§

fn clone(&self) -> Box<dyn LrScheduler>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

§

impl LrScheduler for f64

§

fn step(&mut self) -> f64

§

fn to_record(&self) -> LrSchedulerRecord

§

fn load_record(&mut self, _record: LrSchedulerRecord)

Implementors§