|
| virtual void | to_file (const std::string &filename)=0 |
| |
| virtual void | from_file (const std::string &filename)=0 |
| |
|
| template<typename T, typename = typename std::enable_if< std::is_base_of<Model, T>::value>::type> |
| static void | save_to_file (const std::string &filename, T model) |
| | This method will save (by serializing) the model passed as argument to a .bin file.
|
| |
| template<typename T, typename = typename std::enable_if< std::is_base_of<Model, T>::value>::type> |
| static void | load_from_file (const std::string &filename, T &model) |
| | This static method loads a Model from a file and assigns it to the supposedly "empty" model passed as argument.
|
| |
|
|
void | registerSignals () const |
| |
|
|
int | cEpoch = 0 |
| |
|
double | loss = 0 |
| |
|
double | accuracy = 0 |
| |
|
double | testLoss = 0 |
| |
|
double | testAccuracy = 0 |
| |
|
|
class | cereal::access |
| |
|
class | Callback |
| |
◆ from_file()
| virtual void NeuralNet::Model::from_file |
( |
const std::string & | filename | ) |
|
|
pure virtual |
◆ load_from_file()
template<typename T, typename = typename std::enable_if< std::is_base_of<Model, T>::value>::type>
| static void NeuralNet::Model::load_from_file |
( |
const std::string & | filename, |
|
|
T & | model ) |
|
inlinestatic |
This static method loads a Model from a file and assigns it to the supposedly "empty" model passed as argument.
- Parameters
-
| filename | The name of the binary file from which to retrieve the model |
| model | An "empty" model which will be filled with the loaded model's parameters |
This function will assign the parameters of the saved model in the binary file to the model passed as a parameter
◆ save_to_file()
template<typename T, typename = typename std::enable_if< std::is_base_of<Model, T>::value>::type>
| static void NeuralNet::Model::save_to_file |
( |
const std::string & | filename, |
|
|
T | model ) |
|
inlinestatic |
This method will save (by serializing) the model passed as argument to a .bin file.
- Parameters
-
| filename | The binary file in which the serialized model will be saved |
| model | The model that will be serialized and saved |
◆ to_file()
| virtual void NeuralNet::Model::to_file |
( |
const std::string & | filename | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: