Realm

oa::ml::training::LossMetric

Running completed-step loss metric.

StRust public API

Declaration

pub struct LossMetric { /* private fields */ }
Public Rust declaration.

Public Methods

pub const fn count(&self) -> u64
pub fn mean(&self) -> f64
pub fn last(&self) -> f64
fn name(&self) -> &str
fn reset(&mut self)
fn update_step(&mut self, state: TrainingSnapshot)
fn result(&self) -> f64
fn commit_epoch( &mut self, _context: &mut TrainingCallbackContext<'_>, ) -> Result<()>
fn observe_batch( &mut self, _prediction: &Matrix, _target: &Matrix, ) -> Result<()>

Associated Functions

pub fn new(name: impl Into<String>, aggregation: LossAggregation) -> Self
fn default() -> Self

Public Method Documentation

pub const fn count( &self ) -> u64
No public source comment is attached to this declaration.
pub fn mean( &self ) -> f64
No public source comment is attached to this declaration.
pub fn last( &self ) -> f64
No public source comment is attached to this declaration.
fn name( &self ) -> &str
Commit the completed epoch’s result to the shared history bus. Read more
fn reset( &mut self )
Commit the completed epoch’s result to the shared history bus. Read more
fn update_step( &mut self, state: TrainingSnapshot )
Commit the completed epoch’s result to the shared history bus. Read more
fn result( &self ) -> f64
Commit the completed epoch’s result to the shared history bus. Read more
fn commit_epoch( &mut self, _context: &mut TrainingCallbackContext<'_>, ) -> Result<()>
No public source comment is attached to this declaration.
fn observe_batch( &mut self, _prediction: &Matrix, _target: &Matrix, ) -> Result<()>
No public source comment is attached to this declaration.
pub fn new( name: impl Into<String>, aggregation: LossAggregation ) -> Self
No public source comment is attached to this declaration.
fn default() -> Self
No public source comment is attached to this declaration.