#include <neural_parameters_norm.h>
Public Member Functions | |
NeuralParametersNorm (void) | |
NeuralParametersNorm (NeuralNetwork *) | |
NeuralParametersNorm (TiXmlElement *) | |
virtual | ~NeuralParametersNorm (void) |
const double & | get_neural_parameters_norm_weight (void) const |
void | set_neural_parameters_norm_weight (const double &) |
void | set_default (void) |
void | check (void) const |
double | calculate_evaluation (void) const |
double | calculate_evaluation (const Vector< double > &) const |
Vector< double > | calculate_gradient (void) const |
Matrix< double > | calculate_Hessian (void) const |
std::string | write_performance_term_type (void) const |
std::string | write_information (void) const |
TiXmlElement * | to_XML (void) const |
void | from_XML (TiXmlElement *) |
Definition at line 27 of file neural_parameters_norm.h.
OpenNN::NeuralParametersNorm::NeuralParametersNorm | ( | void | ) | [explicit] |
Default constructor. It creates a neural parameters norm functional not associated to any neural network. It also initializes all the rest of class members to their default values.
Definition at line 43 of file neural_parameters_norm.cpp.
OpenNN::NeuralParametersNorm::NeuralParametersNorm | ( | NeuralNetwork * | new_neural_network_pointer | ) | [explicit] |
Neural network constructor. It creates a neural parameters norm functional associated to a neural network. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. |
Definition at line 57 of file neural_parameters_norm.cpp.
OpenNN::NeuralParametersNorm::NeuralParametersNorm | ( | TiXmlElement * | neural_parameters_norm_element | ) | [explicit] |
XML constructor. It creates a neural parameters norm object not associated to any neural network. The object members are loaded by means of a XML element. Please be careful with the format of that file, which is specified in the OpenNN manual.
neural_parameters_norm_element | Tiny XML element with the neural parameters norm elements. |
Definition at line 72 of file neural_parameters_norm.cpp.
OpenNN::NeuralParametersNorm::~NeuralParametersNorm | ( | void | ) | [virtual] |
Destructor. This destructor does not delete any pointer.
Definition at line 86 of file neural_parameters_norm.cpp.
const double & OpenNN::NeuralParametersNorm::get_neural_parameters_norm_weight | ( | void | ) | const |
This method returns the weight value for the neural parameters norm in the performance term expression.
Definition at line 97 of file neural_parameters_norm.cpp.
void OpenNN::NeuralParametersNorm::set_neural_parameters_norm_weight | ( | const double & | new_neural_parameters_norm_weight | ) |
This method sets a new weight value for the neural parameters norm in the performance term expression.
Definition at line 107 of file neural_parameters_norm.cpp.
void OpenNN::NeuralParametersNorm::set_default | ( | void | ) | [virtual] |
This method sets the default values for the neural parameters norm object:
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 121 of file neural_parameters_norm.cpp.
void OpenNN::NeuralParametersNorm::check | ( | void | ) | const [virtual] |
This method checks that there is a neural network associated to this performance term, and that there is a multilayer perceptron in the neural network. If some of the above conditions is not hold, the method throws an exception.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 135 of file neural_parameters_norm.cpp.
double OpenNN::NeuralParametersNorm::calculate_evaluation | ( | void | ) | const [virtual] |
This method returns the evaluation of this peformance term. It is equal to the weighted norm of the parameters from the associated neural network.
Implements OpenNN::PerformanceTerm.
Definition at line 190 of file neural_parameters_norm.cpp.
double OpenNN::NeuralParametersNorm::calculate_evaluation | ( | const Vector< double > & | parameters | ) | const [virtual] |
This method returns the neural parameters norm value of a neural network for a vector of parameters. It does not set that vector of parameters to the neural network.
parameters | Vector of parameters for the neural network associated to the performance term. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 212 of file neural_parameters_norm.cpp.
Vector< double > OpenNN::NeuralParametersNorm::calculate_gradient | ( | void | ) | const [virtual] |
This method calculates the objective gradient by means of the back-propagation algorithm, and returns it in a single vector of size the number of multilayer_perceptron_pointer parameters.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 231 of file neural_parameters_norm.cpp.
Matrix< double > OpenNN::NeuralParametersNorm::calculate_Hessian | ( | void | ) | const [virtual] |
This method calculates the objective Hessian by means of the back-propagation algorithm, and returns it in a single symmetric matrix of size the number of multilayer_perceptron_pointer parameters.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 254 of file neural_parameters_norm.cpp.
std::string OpenNN::NeuralParametersNorm::write_performance_term_type | ( | void | ) | const [virtual] |
This method returns a string with the name of the neural parameters norm performance type, "NEURAL_PARAMETERS_NORM".
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 280 of file neural_parameters_norm.cpp.
std::string OpenNN::NeuralParametersNorm::write_information | ( | void | ) | const [virtual] |
This method returns a string with the default information of the performance term. It will be used by the training strategy to monitor the training process. By default this information is empty.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 288 of file neural_parameters_norm.cpp.
TiXmlElement * OpenNN::NeuralParametersNorm::to_XML | ( | void | ) | const [virtual] |
This method returns a representation of the sum squared error object, in XML format.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 302 of file neural_parameters_norm.cpp.
void OpenNN::NeuralParametersNorm::from_XML | ( | TiXmlElement * | neural_parameters_norm_element | ) | [virtual] |
This method loads a sum squared error object from a XML element.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 345 of file neural_parameters_norm.cpp.