nnlib
GPU-accelerated, C/C++ neural network library.
Public Member Functions | Public Attributes | List of all members
EpochProgress Struct Reference

Structure to contain information about the current epoch. More...

Public Member Functions

 EpochProgress (size_t numTotal)
 The constructor of the EpochProgress class. More...
 
void update (sTensor &targets, sTensor &predictions, Loss *loss, std::vector< Metric * > &metrics)
 Update the current state of the epoch. More...
 

Public Attributes

size_t numProcessed
 Total number of samples already processed.
 
size_t numTotal
 The total number of samples (processed + non-processed).
 
float lossValue
 The value of the loss.
 
std::map< std::string, float > metricsValues
 Mapping of names of metrics to their computed values.
 
std::chrono::time_point< std::chrono::steady_clock > timeStart
 The time the epoch started.
 

Detailed Description

Structure to contain information about the current epoch.

Constructor & Destructor Documentation

◆ EpochProgress()

EpochProgress::EpochProgress ( size_t  numTotal)
inlineexplicit

The constructor of the EpochProgress class.

Parameters
numTotalThe total number of samples to be processed.

Member Function Documentation

◆ update()

void EpochProgress::update ( sTensor &  targets,
sTensor &  predictions,
Loss loss,
std::vector< Metric * > &  metrics 
)
inline

Update the current state of the epoch.

Parameters
targetsThe desired predictions of the network in the current batch.
predictionsThe actual predictions of the network in the current batch.
lossThe loss object to update.
metricsThe metrics to update given the new batch.

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