Trait burn::train::metric::store::EventStore

pub trait EventStore: Send {
    // Required methods
    fn add_event(&mut self, event: Event, split: Split);
    fn find_epoch(
        &mut self,
        name: &str,
        aggregate: Aggregate,
        direction: Direction,
        split: Split,
    ) -> Option<usize>;
    fn find_metric(
        &mut self,
        name: &str,
        epoch: usize,
        aggregate: Aggregate,
        split: Split,
    ) -> Option<f64>;
}
Expand description

Defines how training and validation events are collected and searched.

This trait also exposes methods that uses the collected data to compute useful information.

Required Methods§

fn add_event(&mut self, event: Event, split: Split)

Collect a training/validation event.

fn find_epoch( &mut self, name: &str, aggregate: Aggregate, direction: Direction, split: Split, ) -> Option<usize>

Find the epoch following the given criteria from the collected data.

fn find_metric( &mut self, name: &str, epoch: usize, aggregate: Aggregate, split: Split, ) -> Option<f64>

Find the metric value for the current epoch following the given criteria.

Implementors§