oa::ml::training::LearningRateScheduler

Applies a learning-rate schedule after every completed optimizer step.

StRust public API

Declaration

pub struct LearningRateScheduler<'schedule> { /* private fields */ }
Public Rust declaration.

Public Methods

fn on_step_end( &mut self, context: &mut TrainingCallbackContext<'_>, ) -> Result<TrainingControl>
fn on_train_begin( &mut self, _context: &mut TrainingCallbackContext<'_>, ) -> Result<TrainingControl>
fn on_epoch_begin( &mut self, _context: &mut TrainingCallbackContext<'_>, ) -> Result<TrainingControl>
fn on_epoch_end( &mut self, _context: &mut TrainingCallbackContext<'_>, ) -> Result<TrainingControl>
fn on_train_end( &mut self, _context: &mut TrainingCallbackContext<'_>, ) -> Result<TrainingControl>

Associated Functions

pub const fn new(schedule: &'schedule dyn LrScheduler) -> Self

Public Method Documentation

fn on_step_end( &mut self, context: &mut TrainingCallbackContext<'_> ) -> Result<TrainingControl>
No public source comment is attached to this declaration.
fn on_train_begin( &mut self, _context: &mut TrainingCallbackContext<'_> ) -> Result<TrainingControl>
No public source comment is attached to this declaration.
fn on_epoch_begin( &mut self, _context: &mut TrainingCallbackContext<'_> ) -> Result<TrainingControl>
No public source comment is attached to this declaration.
fn on_epoch_end( &mut self, _context: &mut TrainingCallbackContext<'_> ) -> Result<TrainingControl>
No public source comment is attached to this declaration.
fn on_train_end( &mut self, _context: &mut TrainingCallbackContext<'_> ) -> Result<TrainingControl>
No public source comment is attached to this declaration.
pub const fn new( schedule: &'schedule dyn LrScheduler ) -> Self
No public source comment is attached to this declaration.