LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::metric_statistics Struct Reference

#include <metric.hpp>

Public Member Functions

 metric_statistics ()
 
 metric_statistics (metric_statistics &other)=default
 
 metric_statistics (const metric_statistics &other)=default
 
metric_statisticsoperator= (metric_statistics &other)=default
 
metric_statisticsoperator= (const metric_statistics &other)=default
 
 ~metric_statistics ()=default
 
template<class Archive >
void serialize (Archive &ar)
 
void add_value (EvalType value, int num_samples=1)
 
EvalType get_mean () const
 
int get_num_samples () const
 
void reset ()
 

Public Attributes

EvalType m_sum
 
int m_num_samples
 

Detailed Description

Metric statistics.

Definition at line 46 of file metric.hpp.

Constructor & Destructor Documentation

◆ metric_statistics() [1/3]

lbann::metric_statistics::metric_statistics ( )
inline

Default constructor.

Definition at line 53 of file metric.hpp.

Here is the call graph for this function:

◆ metric_statistics() [2/3]

lbann::metric_statistics::metric_statistics ( metric_statistics other)
default

Move constructor.

◆ metric_statistics() [3/3]

lbann::metric_statistics::metric_statistics ( const metric_statistics other)
default

Copy constructor.

◆ ~metric_statistics()

lbann::metric_statistics::~metric_statistics ( )
default

Destructor.

Here is the caller graph for this function:

Member Function Documentation

◆ add_value()

void lbann::metric_statistics::add_value ( EvalType  value,
int  num_samples = 1 
)

Add metric value to statistics.

Here is the caller graph for this function:

◆ get_mean()

EvalType lbann::metric_statistics::get_mean ( ) const

Get mean metric value. If mini-batch sizes are not identical, the mean is over the sample values rather than over the mini-batch mean values.

Here is the caller graph for this function:

◆ get_num_samples()

int lbann::metric_statistics::get_num_samples ( ) const
inline

Get number of samples.

Definition at line 77 of file metric.hpp.

Here is the call graph for this function:

◆ operator=() [1/2]

metric_statistics& lbann::metric_statistics::operator= ( metric_statistics other)
default

Move assignment operator.

Here is the caller graph for this function:

◆ operator=() [2/2]

metric_statistics& lbann::metric_statistics::operator= ( const metric_statistics other)
default

Copy assignment operator.

◆ reset()

void lbann::metric_statistics::reset ( )

Reset statistics.

Here is the caller graph for this function:

◆ serialize()

template<class Archive >
void lbann::metric_statistics::serialize ( Archive &  ar)

Archive for checkpoint and restart

Here is the caller graph for this function:

Member Data Documentation

◆ m_num_samples

int lbann::metric_statistics::m_num_samples

Number of samples.

Definition at line 51 of file metric.hpp.

◆ m_sum

EvalType lbann::metric_statistics::m_sum

Sum of metric values.

Definition at line 49 of file metric.hpp.


The documentation for this struct was generated from the following file: