oa::ml::training::Checkpoint

Epoch, interval, best-model, and restore-best checkpoint policy.

StRust public API

Declaration

pub struct Checkpoint<'owner, 'engine> { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn set_save_every(&mut self, steps: u64)
pub fn set_validation_metric(&mut self, metric: ValidationMetric)
pub fn set_restore_best(&mut self, restore: bool)
pub fn set_verbose(&mut self, verbose: bool)
pub const fn best_epoch(&self) -> u64
fn on_step_end( &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>
fn on_train_begin( &mut self, _context: &mut TrainingCallbackContext<'_>, ) -> Result<TrainingControl>
fn on_epoch_begin( &mut self, _context: &mut TrainingCallbackContext<'_>, ) -> Result<TrainingControl>

Associated Functions

pub fn new( manager: &'owner mut CheckpointManager<'engine>, model: &'owner dyn Module, ) -> Self

Public Method Documentation

pub fn set_save_every( &mut self, steps: u64 )
No public source comment is attached to this declaration.
pub fn set_validation_metric( &mut self, metric: ValidationMetric )
No public source comment is attached to this declaration.
pub fn set_restore_best( &mut self, restore: bool )
No public source comment is attached to this declaration.
pub fn set_verbose( &mut self, verbose: bool )
No public source comment is attached to this declaration.
pub const fn best_epoch( &self ) -> u64
No public source comment is attached to this declaration.
fn on_step_end( &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.
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.
pub fn new( manager: &'owner mut CheckpointManager<'engine>, model: &'owner dyn Module ) -> Self
No public source comment is attached to this declaration.