EpochStats

EpochStats

Manages the training statistics for one model. TensorFlow produces stats each epoch. This class records them, and maintains trailing averages to smooth spikes and dips. It calculates deltas and slopes for these averages. This information can be used to detect problematic situations such as overfitting. EpochStats also has text helpers for logging and output as CSV.

Constructor

new EpochStats(_trailDepth)

Creates an instance of EpochStats.
Parameters:
Name Type Description
_trailDepth number Total samples in a (simple) trailing average.
Source:

Methods

(static) WriteReportHeader() → {string}

Gets the header that goes with WriteReport.
Returns:
Type
string
Source:

Update(epoch, logs)

Takes the results of an epoch, and updates the trailing averages, deltas and slopes.
Parameters:
Name Type Description
epoch number Iteration count from model fit; currently unused.
logs Logs A TensorFlow object with the latest values for accuracy, loss, validation-accuracy and validation-loss.
Source:

WriteReport() → {string}

Generates a one-line text report with the following:
  • all of the trailing averages
  • the slope of each average (accuracy, loss, validation-accuracy and validation-loss)
  • relevant deltas between the training and validation values
Returns:
Type
string
Source: