NeuralNet 1.0
Loading...
Searching...
No Matches
NeuralNet::ModelCheckpoint Class Reference
Inheritance diagram for NeuralNet::ModelCheckpoint:
NeuralNet::Callback

Public Member Functions

 ModelCheckpoint (const std::string &folderPath, const bool saveBestOnly=true, const int numEpochs=1, const bool verbose=false)
 
void onEpochBegin (Model &model) override
 
void onEpochEnd (Model &model) override
 This method will be called at the end of each epoch.
 
void onTrainBegin (Model &model) override
 
void onTrainEnd (Model &model) override
 
void onBatchBegin (Model &model) override
 
void onBatchEnd (Model &model) override
 

Additional Inherited Members

- Static Public Member Functions inherited from NeuralNet::Callback
template<typename T >
static void callMethod (std::shared_ptr< T > callback, const std::string &methodName, Model &model)
 Calls the method of the callback with the given logs.
 
- Static Protected Member Functions inherited from NeuralNet::Callback
static void checkMetric (const std::string &metric, const std::vector< std::string > &metrics)
 
static std::unordered_map< std::string, Logs > getLogs (Model &model)
 

Member Function Documentation

◆ onBatchBegin()

void NeuralNet::ModelCheckpoint::onBatchBegin ( Model & model)
inlineoverridevirtual

Implements NeuralNet::Callback.

◆ onBatchEnd()

void NeuralNet::ModelCheckpoint::onBatchEnd ( Model & model)
inlineoverridevirtual

Implements NeuralNet::Callback.

◆ onEpochBegin()

void NeuralNet::ModelCheckpoint::onEpochBegin ( Model & model)
inlineoverridevirtual

Implements NeuralNet::Callback.

◆ onEpochEnd()

void NeuralNet::ModelCheckpoint::onEpochEnd ( Model & model)
inlineoverridevirtual

This method will be called at the end of each epoch.

Parameters
epochThe current epoch
logsThe logs of the current epoch
Returns
Returns true if the training should continue otherwise returns false
Warning
The order of the logs should be the same as the order of the metrics.

Implements NeuralNet::Callback.

◆ onTrainBegin()

void NeuralNet::ModelCheckpoint::onTrainBegin ( Model & model)
inlineoverridevirtual

Implements NeuralNet::Callback.

◆ onTrainEnd()

void NeuralNet::ModelCheckpoint::onTrainEnd ( Model & model)
inlineoverridevirtual

Implements NeuralNet::Callback.


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