|
OpenNN
Open-source neural networks library
|
Per-epoch error history and final summary produced by Optimizer::train(). More...
#include <optimizer.h>
Public Member Functions | |
| TrainingResults (const Index expected_epochs=0) | |
| Constructs a TrainingResults pre-sized for an expected epoch count. | |
| virtual | ~TrainingResults ()=default |
| Virtual destructor. | |
| string | write_stopping_condition () const |
| Returns the canonical string name of the stopping condition. | |
| float | get_training_error () const |
| Final training error (last entry of training_error_history). | |
| float | get_validation_error () const |
| Final validation error (last entry of validation_error_history). | |
| Index | get_epochs_number () const |
| Number of epochs effectively run. | |
| void | save (const filesystem::path &) const |
| Saves the training results (history and final summary) to a file. | |
| void | print (const string &message=string()) const |
| Prints a human-readable summary to stdout. | |
| Tensor< string, 2 > | write_override_results (const Index decimals=3) const |
| Returns a 2D string table summarizing the training run. | |
| void | resize_training_error_history (const Index) |
| Resizes the training error history. | |
| void | resize_validation_error_history (const Index) |
| Resizes the validation error history. | |
Public Attributes | |
| Optimizer::StoppingCondition | stopping_condition = Optimizer::StoppingCondition::None |
| Stopping condition that ended the training run. | |
| VectorR | training_error_history |
| Per-epoch training error. | |
| VectorR | validation_error_history |
| Per-epoch validation error. | |
| string | elapsed_time |
| Total elapsed wall-clock time, formatted as "hh:mm:ss". | |
| float | loss = NAN |
| Final loss value. | |
| Index | validation_failures = 0 |
| Number of consecutive validation-error increases at end of training. | |
| float | loss_decrease = 0.0f |
| Loss decrease observed in the last epoch. | |
Per-epoch error history and final summary produced by Optimizer::train().
| opennn::TrainingResults::TrainingResults | ( | const Index | expected_epochs = 0 | ) |
Constructs a TrainingResults pre-sized for an expected epoch count.
| expected_epochs | Initial capacity for the error history vectors. |
|
virtualdefault |
Virtual destructor.
| Index opennn::TrainingResults::get_epochs_number | ( | ) | const |
Number of epochs effectively run.
| float opennn::TrainingResults::get_training_error | ( | ) | const |
Final training error (last entry of training_error_history).
| float opennn::TrainingResults::get_validation_error | ( | ) | const |
Final validation error (last entry of validation_error_history).
| void opennn::TrainingResults::print | ( | const string & | message = string() | ) | const |
Prints a human-readable summary to stdout.
| message | Optional prefix message. |
| void opennn::TrainingResults::resize_training_error_history | ( | const Index | ) |
Resizes the training error history.
Receives the new size.
| void opennn::TrainingResults::resize_validation_error_history | ( | const Index | ) |
Resizes the validation error history.
Receives the new size.
| void opennn::TrainingResults::save | ( | const filesystem::path & | ) | const |
Saves the training results (history and final summary) to a file.
Receives the destination path.
| Tensor< string, 2 > opennn::TrainingResults::write_override_results | ( | const Index | decimals = 3 | ) | const |
Returns a 2D string table summarizing the training run.
| decimals | Number of decimals used when formatting floats. |
| string opennn::TrainingResults::write_stopping_condition | ( | ) | const |
Returns the canonical string name of the stopping condition.
| string opennn::TrainingResults::elapsed_time |
Total elapsed wall-clock time, formatted as "hh:mm:ss".
| float opennn::TrainingResults::loss = NAN |
Final loss value.
| float opennn::TrainingResults::loss_decrease = 0.0f |
Loss decrease observed in the last epoch.
| Optimizer::StoppingCondition opennn::TrainingResults::stopping_condition = Optimizer::StoppingCondition::None |
Stopping condition that ended the training run.
| VectorR opennn::TrainingResults::training_error_history |
Per-epoch training error.
| VectorR opennn::TrainingResults::validation_error_history |
Per-epoch validation error.
| Index opennn::TrainingResults::validation_failures = 0 |
Number of consecutive validation-error increases at end of training.