|
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 void | checkMetric (const std::string &metric, const std::vector< std::string > &metrics) |
|
static std::unordered_map< std::string, Logs > | getLogs (Model &model) |
|
◆ CSVLogger()
NeuralNet::CSVLogger::CSVLogger |
( |
const std::string & | filepath, |
|
|
const std::string & | separator = "," ) |
|
inline |
CSVLogger is a Callback
that streams epoch results to a csv file.
- Parameters
-
filepath | The name of the csv file |
separator | The separator used in the csv file (default: ",") |
◆ onBatchBegin()
void NeuralNet::CSVLogger::onBatchBegin |
( |
Model & | model | ) |
|
|
inlineoverridevirtual |
◆ onBatchEnd()
void NeuralNet::CSVLogger::onBatchEnd |
( |
Model & | model | ) |
|
|
inlineoverridevirtual |
◆ onEpochBegin()
void NeuralNet::CSVLogger::onEpochBegin |
( |
Model & | model | ) |
|
|
inlineoverridevirtual |
◆ onEpochEnd()
void NeuralNet::CSVLogger::onEpochEnd |
( |
Model & | model | ) |
|
|
inlineoverridevirtual |
This method will be called at the end of each epoch.
In the case of CSVLogger, it will append the logs of the current epoch to data which onTrainEnd
will be written to the file.
- Parameters
-
logs | The logs of the current epoch |
Implements NeuralNet::Callback.
◆ onTrainBegin()
void NeuralNet::CSVLogger::onTrainBegin |
( |
Model & | model | ) |
|
|
inlineoverridevirtual |
This method will be called at the beginning of the training.
It will initialize the headers with the logs keys.
- Parameters
-
logs | The logs of the current epoch |
Implements NeuralNet::Callback.
◆ onTrainEnd()
void NeuralNet::CSVLogger::onTrainEnd |
( |
Model & | model | ) |
|
|
inlineoverridevirtual |
This method will be called at the end of the training.
It will write the data in the given csv file.
- Parameters
-
logs | The logs of the current epoch |
Implements NeuralNet::Callback.
The documentation for this class was generated from the following file: