TrainingCallback

Trait TrainingCallback 

Source
pub trait TrainingCallback: Send + Sync {
    // Provided methods
    fn on_stage_change(&self, _stage: &PipelineStage) { ... }
    fn on_batch_complete(
        &self,
        _batch_idx: usize,
        _total_batches: usize,
        _avg_quality: f32,
    ) { ... }
    fn on_epoch_complete(&self, _epoch: usize, _stats: &EpochStats) { ... }
    fn on_training_complete(&self, _result: &TrainingResult) { ... }
    fn on_error(&self, _error: &str) { ... }
}
Expand description

Callback trait for training events

Provided Methods§

Source

fn on_stage_change(&self, _stage: &PipelineStage)

Called when stage changes

Source

fn on_batch_complete( &self, _batch_idx: usize, _total_batches: usize, _avg_quality: f32, )

Called after each batch

Source

fn on_epoch_complete(&self, _epoch: usize, _stats: &EpochStats)

Called after each epoch

Source

fn on_training_complete(&self, _result: &TrainingResult)

Called when training completes

Source

fn on_error(&self, _error: &str)

Called on error

Implementors§