#include <perceptron_layer.h>
Public Member Functions | |
PerceptronLayer (void) | |
PerceptronLayer (const unsigned int &, const unsigned int &) | |
PerceptronLayer (const PerceptronLayer &) | |
virtual | ~PerceptronLayer (void) |
PerceptronLayer & | operator= (const PerceptronLayer &) |
bool | operator== (const PerceptronLayer &) const |
bool | is_empty (void) const |
const Vector< Perceptron > & | get_perceptrons (void) const |
const Perceptron & | get_perceptron (const unsigned int &) const |
unsigned int | count_inputs_number (void) const |
unsigned int | count_perceptrons_number (void) const |
Vector< double > | arrange_biases (void) const |
Matrix< double > | arrange_synaptic_weights (void) const |
unsigned int | count_parameters_number (void) const |
Vector< double > | arrange_parameters (void) const |
Vector< unsigned int > | count_cumulative_parameters_number (void) const |
const Perceptron::ActivationFunction & | get_activation_function (void) const |
std::string | write_activation_function_name (void) const |
const bool & | get_display (void) const |
void | set (void) |
void | set (const Vector< Perceptron > &) |
void | set (const unsigned int &, const unsigned int &) |
void | set (const PerceptronLayer &) |
void | set_default (void) |
void | set_inputs_number (const unsigned int &) |
void | set_perceptrons_number (const unsigned int &) |
void | set_perceptrons (const Vector< Perceptron > &) |
void | set_perceptron (const unsigned int &, const Perceptron &) |
void | set_biases (const Vector< double > &) |
void | set_synaptic_weights (const Matrix< double > &) |
void | set_parameters (const Vector< double > &) |
void | set_activation_function (const Perceptron::ActivationFunction &) |
void | set_activation_function (const std::string &) |
void | set_display (const bool &) |
void | grow_input (void) |
void | grow_perceptron (void) |
void | prune_input (const unsigned int &) |
void | prune_perceptron (const unsigned int &) |
void | initialize_random (void) |
void | initialize_biases (const double &) |
void | initialize_synaptic_weights (const double &) |
void | initialize_parameters (const double &) |
void | initialize_parameters_uniform (void) |
void | initialize_parameters_uniform (const double &, const double &) |
void | initialize_parameters_uniform (const Vector< double > &, const Vector< double > &) |
void | initialize_parameters_uniform (const Vector< Vector< double > > &) |
void | initialize_parameters_normal (void) |
void | initialize_parameters_normal (const double &, const double &) |
void | initialize_parameters_normal (const Vector< double > &, const Vector< double > &) |
void | initialize_parameters_normal (const Vector< Vector< double > > &) |
double | calculate_parameters_norm (void) const |
Vector< double > | calculate_combination (const Vector< double > &) const |
Matrix< double > | calculate_combination_Jacobian (const Vector< double > &) const |
Vector< Matrix< double > > | calculate_combination_Hessian_form (const Vector< double > &) const |
Vector< double > | calculate_combination_parameters (const Vector< double > &, const Vector< double > &) const |
Matrix< double > | calculate_combination_parameters_Jacobian (const Vector< double > &, const Vector< double > &) const |
Vector< Matrix< double > > | calculate_combination_parameters_Hessian_form (const Vector< double > &, const Vector< double > &) const |
Vector< double > | calculate_activation (const Vector< double > &) const |
Vector< double > | calculate_activation_derivative (const Vector< double > &) const |
Vector< double > | calculate_activation_second_derivative (const Vector< double > &) const |
Matrix< double > | arrange_activation_Jacobian (const Vector< double > &) const |
Vector< Matrix< double > > | arrange_activation_Hessian_form (const Vector< double > &) const |
Vector< double > | calculate_outputs (const Vector< double > &) const |
Matrix< double > | calculate_Jacobian (const Vector< double > &) const |
Vector< Matrix< double > > | calculate_Hessian_form (const Vector< double > &) const |
Vector< double > | calculate_parameters_output (const Vector< double > &, const Vector< double > &) const |
Matrix< double > | calculate_parameters_Jacobian (const Vector< double > &, const Vector< double > &) const |
Vector< Matrix< double > > | calculate_parameters_Hessian_form (const Vector< double > &, const Vector< double > &) const |
std::string | write_expression (const Vector< std::string > &, const Vector< std::string > &) const |
Protected Attributes | |
Vector< Perceptron > | perceptrons |
bool | display |
Definition at line 36 of file perceptron_layer.h.
OpenNN::PerceptronLayer::PerceptronLayer | ( | void | ) | [explicit] |
Default constructor. It creates a empty layer object, with no perceptrons. This constructor also initializes the rest of class members to their default values.
Definition at line 38 of file perceptron_layer.cpp.
OpenNN::PerceptronLayer::PerceptronLayer | ( | const unsigned int & | new_inputs_number, | |
const unsigned int & | new_perceptrons_number | |||
) | [explicit] |
Layer architecture constructor. It creates a layer object with given numbers of inputs and perceptrons. The parameters are initialized at random. This constructor also initializes the rest of class members to their default values.
new_inputs_number | Number of inputs in the layer. | |
new_perceptrons_number | Number of perceptrons in the layer. |
Definition at line 53 of file perceptron_layer.cpp.
OpenNN::PerceptronLayer::PerceptronLayer | ( | const PerceptronLayer & | other_perceptron_layer | ) |
Copy constructor. It creates a copy of an existing perceptron layer object.
other_perceptron_layer | Perceptron layer object to be copied. |
Definition at line 65 of file perceptron_layer.cpp.
OpenNN::PerceptronLayer::~PerceptronLayer | ( | void | ) | [virtual] |
Destructor. This destructor does not delete any pointer.
Definition at line 76 of file perceptron_layer.cpp.
PerceptronLayer & OpenNN::PerceptronLayer::operator= | ( | const PerceptronLayer & | other_perceptron_layer | ) |
Assignment operator. It assigns to this object the members of an existing perceptron layer object.
other_perceptron_layer | Perceptron layer object to be assigned. |
Definition at line 87 of file perceptron_layer.cpp.
bool OpenNN::PerceptronLayer::operator== | ( | const PerceptronLayer & | other_perceptron_layer | ) | const |
Equal to operator. It compares this object with another object of the same class. It returns true if the members of the two objects have the same values, and false otherwise. @ param other_perceptron_layer Perceptron layer to be compared with.
Definition at line 109 of file perceptron_layer.cpp.
bool OpenNN::PerceptronLayer::is_empty | ( | void | ) | const |
This method returns true if the size of the layer is zero, and false otherwise.
Definition at line 130 of file perceptron_layer.cpp.
const Vector< Perceptron > & OpenNN::PerceptronLayer::get_perceptrons | ( | void | ) | const |
This method returns a constant reference to the vector of perceptrons defining the layer.
Definition at line 147 of file perceptron_layer.cpp.
const Perceptron & OpenNN::PerceptronLayer::get_perceptron | ( | const unsigned int & | index | ) | const |
This method returns a reference to a given element in the perceptrons vector.
index | Index of perceptron element. |
Definition at line 187 of file perceptron_layer.cpp.
unsigned int OpenNN::PerceptronLayer::count_inputs_number | ( | void | ) | const |
This method returns the number of inputs to the layer.
Definition at line 157 of file perceptron_layer.cpp.
unsigned int OpenNN::PerceptronLayer::count_perceptrons_number | ( | void | ) | const |
This method returns a reference to the size of the perceptrons vector.
Definition at line 174 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::arrange_biases | ( | void | ) | const |
This method returns the biases from all the perceptrons in the layer. The format is a vector of real values. The size of this vector is the number of neurons in the layer.
Definition at line 262 of file perceptron_layer.cpp.
Matrix< double > OpenNN::PerceptronLayer::arrange_synaptic_weights | ( | void | ) | const |
This method returns the synaptic weights from the perceptrons. The format is a matrix of real values. The number of rows is the number of neurons in the layer. The number of columns is the number of inputs to the layer.
Definition at line 284 of file perceptron_layer.cpp.
unsigned int OpenNN::PerceptronLayer::count_parameters_number | ( | void | ) | const |
This method returns the number of parameters (biases and synaptic weights) of the layer.
Definition at line 216 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::arrange_parameters | ( | void | ) | const |
This method returns a single vector with all the layer parameters. The format is a vector of real values. The size is the number of parameters in the layer.
Definition at line 310 of file perceptron_layer.cpp.
Vector< unsigned int > OpenNN::PerceptronLayer::count_cumulative_parameters_number | ( | void | ) | const |
This method returns a vector of size the number of neurons in the layer, where each element is equal to the total number of parameters in the current and all the previous neurons.
Definition at line 236 of file perceptron_layer.cpp.
const Perceptron::ActivationFunction & OpenNN::PerceptronLayer::get_activation_function | ( | void | ) | const |
This method returns the activation function of the layer. The activation function of a layer is the activation function of all perceptrons in it.
Definition at line 349 of file perceptron_layer.cpp.
std::string OpenNN::PerceptronLayer::write_activation_function_name | ( | void | ) | const |
This method returns a string with the name of the layer activation function. This can be: Logistic, HyperbolicTangent, Threshold, SymmetricThreshold or Linear.
Definition at line 375 of file perceptron_layer.cpp.
const bool & OpenNN::PerceptronLayer::get_display | ( | void | ) | const |
This method returns true if messages from this class are to be displayed on the screen, or false if messages from this class are not to be displayed on the screen.
Definition at line 431 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set | ( | void | ) |
This method sets an empty layer, wihtout any perceptron. It also sets the rest of members to their default values.
Definition at line 442 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set | ( | const Vector< Perceptron > & | new_perceptrons | ) |
This method sets a new layer from a given vector of perceptrons. The rest of members of this class are given their defaul values.
Definition at line 455 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set | ( | const unsigned int & | new_inputs_number, | |
const unsigned int & | new_perceptrons_number | |||
) |
This method sets new numbers of inputs and perceptrons in the layer. It also sets the rest of members to their default values.
new_inputs_number | Number of inputs. | |
new_perceptrons_number | Number of perceptron neurons. |
Definition at line 470 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set | ( | const PerceptronLayer & | other_perceptron_layer | ) |
This method sets the members of this perceptron layer object with those from other perceptron layer object.
other_perceptron_layer | PerceptronLayer object to be copied. |
Definition at line 488 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_default | ( | void | ) |
This method sets those members not related to the vector of perceptrons to their default value.
Definition at line 526 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_inputs_number | ( | const unsigned int & | new_inputs_number | ) |
This method sets a new number of inputs in the layer. The new synaptic weights are initialized at random.
new_inputs_number | Number of layer inputs. |
Definition at line 538 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_perceptrons_number | ( | const unsigned int & | new_perceptrons_number | ) |
This method sets a new number perceptrons in the layer. All the parameters are also initialized at random.
new_perceptrons_number | New number of neurons in the layer. |
Definition at line 555 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_perceptrons | ( | const Vector< Perceptron > & | new_perceptrons | ) |
This method sets a new vector of percpetrons in the layer.
new_perceptrons | Perceptrons vector. |
Definition at line 501 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_perceptron | ( | const unsigned int & | i, | |
const Perceptron & | new_perceptron | |||
) |
This method sets a single perceptron in the layer.
i | Index of perceptron. | |
new_perceptron | Perceptron neuron to be set. |
Definition at line 513 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_biases | ( | const Vector< double > & | new_biases | ) |
This method sets the biases of all perceptrons in the layer from a single vector.
new_biases | New set of biases in the layer. |
Definition at line 580 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_synaptic_weights | ( | const Matrix< double > & | new_synaptic_weights | ) |
This method sets the synaptic weights of this perceptron layer from a single matrix. The format is a matrix of real numbers. The number of rows is the number of neurons in the corresponding layer. The number of columns is the number of inputs to the corresponding layer.
new_synaptic_weights | New set of synaptic weights in that layer. |
Definition at line 620 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_parameters | ( | const Vector< double > & | new_parameters | ) |
This method sets the parameters of this layer.
new_parameters | Parameters vector for that layer. |
Definition at line 670 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_activation_function | ( | const Perceptron::ActivationFunction & | new_activation_function | ) |
This class sets a new activation (or transfer) function in a single layer.
new_activation_function | Activation function for the layer with the previous index. |
Definition at line 718 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_activation_function | ( | const std::string & | new_activation_function | ) |
This method sets a new activation (or transfer) function in a single layer. The second argument is a string containing the name of the function ("Logistic", "HyperbolicTangent", "Threshold", etc).
new_activation_function | Activation function for that layer. |
Definition at line 735 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::set_display | ( | const bool & | new_display | ) |
This method sets a new display value. If it is set to true messages from this class are to be displayed on the screen; if it is set to false messages from this class are not to be displayed on the screen.
new_display | Display value. |
Definition at line 753 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::grow_input | ( | void | ) |
This method makes the perceptron layer to have one more input.
Definition at line 763 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::grow_perceptron | ( | void | ) |
This method makes the perceptron layer to have one more perceptron.
Definition at line 778 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::prune_input | ( | const unsigned int & | index | ) |
This method removes a given input from the layer of perceptrons.
index | Index of input to be pruned. |
Definition at line 795 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::prune_perceptron | ( | const unsigned int & | index | ) |
This method removes a given perceptron from the layer.
index | Index of perceptron to be pruned. |
Definition at line 811 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_random | ( | void | ) |
This method initializes the perceptron layer with a random number of inputs and a randon number of perceptrons. That can be useful for testing purposes.
Definition at line 822 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_biases | ( | const double & | value | ) |
This method initializes the biases of all the perceptrons in the layer of perceptrons with a given value.
value | Biases initialization value. |
Definition at line 838 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_synaptic_weights | ( | const double & | value | ) |
This method initializes the synaptic weights of all the perceptrons in the layer of perceptrons perceptron with a given value.
value | Synaptic weights initialization value. |
Definition at line 854 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters | ( | const double & | value | ) |
This method initializes all the biases and synaptic weights in the neural newtork with a given value.
value | Parameters initialization value. |
Definition at line 870 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters_uniform | ( | void | ) |
This method initializes all the biases and synaptic weights in the neural newtork at random with values comprised between -1 and +1.
Definition at line 885 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters_uniform | ( | const double & | minimum, | |
const double & | maximum | |||
) |
This method initializes all the biases and synaptic weights in the layer of perceptrons at random with values comprised between a minimum and a maximum values.
minimum | Minimum initialization value. | |
maximum | Maximum initialization value. |
Definition at line 904 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters_uniform | ( | const Vector< double > & | minimum, | |
const Vector< double > & | maximum | |||
) |
This method initializes all the biases and synaptic weights in the layer of perceptrons at random, with values comprised between different minimum and maximum numbers for each parameter.
minimum | Vector of minimum initialization values. | |
maximum | Vector of maximum initialization values. |
Definition at line 923 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters_uniform | ( | const Vector< Vector< double > > & | minimum_maximum | ) |
This method initializes all the biases and synaptic weights in the layer of perceptrons at random, with values comprised between a different minimum and maximum numbers for each parameter. All minimum are maximum initialization values must be given from a vector of two real vectors. The first element must contain the minimum inizizalization value for each parameter. The second element must contain the maximum inizizalization value for each parameter.
minimum_maximum | Vector of minimum and maximum initialization values. |
Definition at line 944 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters_normal | ( | void | ) |
This method initializes all the biases and synaptic weights in the newtork with random values chosen from a normal distribution with mean 0 and standard deviation 1.
Definition at line 961 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters_normal | ( | const double & | mean, | |
const double & | standard_deviation | |||
) |
This method initializes all the biases and synaptic weights in the layer of perceptrons with random random values chosen from a normal distribution with a given mean and a given standard deviation.
mean | Mean of normal distribution. | |
standard_deviation | Standard deviation of normal distribution. |
Definition at line 980 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters_normal | ( | const Vector< double > & | mean, | |
const Vector< double > & | standard_deviation | |||
) |
This method initializes all the biases an synaptic weights in the layer of perceptrons with random values chosen from normal distributions with different mean and standard deviation for each parameter.
Definition at line 999 of file perceptron_layer.cpp.
void OpenNN::PerceptronLayer::initialize_parameters_normal | ( | const Vector< Vector< double > > & | mean_standard_deviation | ) |
This method initializes all the biases and synaptic weights in the layer of perceptrons with random values chosen from normal distributions with different mean and standard deviation for each parameter. All mean and standard deviation values are given from a vector of two real vectors. The first element must contain the mean value for each parameter. The second element must contain the standard deviation value for each parameter.
mean_standard_deviation | Vector of mean and standard deviation values. |
Definition at line 1020 of file perceptron_layer.cpp.
double OpenNN::PerceptronLayer::calculate_parameters_norm | ( | void | ) | const |
This method calculates the norm of a layer parameters vector.
Definition at line 1036 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::calculate_combination | ( | const Vector< double > & | inputs | ) | const |
This method returns the combination to every perceptron in the layer as a function of the inputs to that layer.
inputs | Input to the layer with the previous index. |
Definition at line 1047 of file perceptron_layer.cpp.
Matrix< double > OpenNN::PerceptronLayer::calculate_combination_Jacobian | ( | const Vector< double > & | ) | const |
This method returns the partial derivatives of the combination of a layer with respect to the inputs. All that partial derivatives are arranged in the so called Jacobian matrix of the layer combination function.
Definition at line 1090 of file perceptron_layer.cpp.
Vector< Matrix< double > > OpenNN::PerceptronLayer::calculate_combination_Hessian_form | ( | const Vector< double > & | ) | const |
This method returns the second partial derivatives of the combination of a layer with respect to the inputs of that layer. All that partial derivatives are arranged in the so called Hessian form, represented as a vector of matrices, of the layer combination function.
Definition at line 1101 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::calculate_combination_parameters | ( | const Vector< double > & | inputs, | |
const Vector< double > & | parameters | |||
) | const |
This method returns which would be the combination of a layer as a function of the inputs and for a set of parameters.
Definition at line 1123 of file perceptron_layer.cpp.
Matrix< double > OpenNN::PerceptronLayer::calculate_combination_parameters_Jacobian | ( | const Vector< double > & | inputs, | |
const Vector< double > & | ||||
) | const |
This method returns the partial derivatives of the combination of a layer with respect to the parameters in that layer, for a given set of inputs. All that partial derivatives are arranged in the so called Jacobian matrix of the layer combination function.
inputs | Vector of inputs to that layer. |
Definition at line 1174 of file perceptron_layer.cpp.
Vector< Matrix< double > > OpenNN::PerceptronLayer::calculate_combination_parameters_Hessian_form | ( | const Vector< double > & | , | |
const Vector< double > & | ||||
) | const |
This method returns the second partial derivatives of the combination of a layer with respect to the parameters in that layer, for a given set of inputs. All that partial derivatives are arranged in the so called Hessian form, represented as a vector of matrices, of the layer combination function.
Definition at line 1210 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::calculate_activation | ( | const Vector< double > & | combination | ) | const |
This method returns the outputs from every perceptron in a layer as a function of their combination.
combination | Combination to every neuron in the layer with the previous index. |
Definition at line 1232 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::calculate_activation_derivative | ( | const Vector< double > & | combination | ) | const |
This method returns the activation derivative from every perceptron in a layer as a function of their combination.
combination | Combination to every neuron in the layer with the previous index. |
Definition at line 1273 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::calculate_activation_second_derivative | ( | const Vector< double > & | combination | ) | const |
This method returns the activation second derivative from every perceptron as a function of their combination.
combination | Combination to every perceptron in the layer. |
Definition at line 1314 of file perceptron_layer.cpp.
Matrix< double > OpenNN::PerceptronLayer::arrange_activation_Jacobian | ( | const Vector< double > & | activation_derivative | ) | const |
This method arranges a "Jacobian" matrix from a vector of derivatives.
activation_derivative | Vector of activation function derivatives. |
Definition at line 1355 of file perceptron_layer.cpp.
Vector< Matrix< double > > OpenNN::PerceptronLayer::arrange_activation_Hessian_form | ( | const Vector< double > & | activation_second_derivative | ) | const |
This method arranges a "Hessian form" vector of matrices from a vector of second derivatives.
activation_second_derivative | Vector of activation function second derivatives. |
Definition at line 1372 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::calculate_outputs | ( | const Vector< double > & | inputs | ) | const |
This method returns the outputs from every perceptron in a layer as a function of their inputs.
inputs | Input vector to the layer with the previous index. |
Definition at line 1393 of file perceptron_layer.cpp.
Matrix< double > OpenNN::PerceptronLayer::calculate_Jacobian | ( | const Vector< double > & | inputs | ) | const |
This method returns the Jacobian matrix of a layer for a given inputs to that layer. This is composed by the derivatives of the layer outputs with respect to their inputs. The number of rows is the number of neurons in the layer. The number of columns is the number of inputs to that layer.
inputs | Input to layer. |
Definition at line 1428 of file perceptron_layer.cpp.
Vector< Matrix< double > > OpenNN::PerceptronLayer::calculate_Hessian_form | ( | const Vector< double > & | inputs | ) | const |
This method returns the second partial derivatives of the outputs from a layer with respect to the inputs to that layer.
inputs | Vector of inputs to that layer. |
Definition at line 1469 of file perceptron_layer.cpp.
Vector< double > OpenNN::PerceptronLayer::calculate_parameters_output | ( | const Vector< double > & | inputs, | |
const Vector< double > & | parameters | |||
) | const |
This method returns which would be the outputs from a layer for a given inputs to that layer and a set of parameters in that layer.
Definition at line 1501 of file perceptron_layer.cpp.
Matrix< double > OpenNN::PerceptronLayer::calculate_parameters_Jacobian | ( | const Vector< double > & | inputs, | |
const Vector< double > & | parameters | |||
) | const |
This method returns the parameters Jacobian for a given set of inputs. This is composed by the derivatives of the layer outputs with respect to the layer parameters. The number of rows is the number of neurons in the layer. The number of columns is the number of parameters in that layer.
inputs | Set of inputs to the layer. | |
parameters | Set of layer parameters. |
Definition at line 1556 of file perceptron_layer.cpp.
Vector< Matrix< double > > OpenNN::PerceptronLayer::calculate_parameters_Hessian_form | ( | const Vector< double > & | inputs, | |
const Vector< double > & | parameters | |||
) | const |
This method returns the second partial derivatives of the outputs from a layer with respect to the parameters in that layer, for a given inputs to that layer. This quantity is the Hessian form of the layer outputs function, and it is represented as a vector of matrices.
inputs | Set of layer inputs. | |
parameters | Set of layer parameters. |
Definition at line 1597 of file perceptron_layer.cpp.
std::string OpenNN::PerceptronLayer::write_expression | ( | const Vector< std::string > & | inputs_name, | |
const Vector< std::string > & | outputs_name | |||
) | const |
This method returns a string with the expression of the inputs-outputs relationship of the layer.
inputs_name | Vector of strings with the name of the layer inputs. | |
outputs_name | Vector of strings with the name of the layer outputs. |
Definition at line 1648 of file perceptron_layer.cpp.
Vector<Perceptron> OpenNN::PerceptronLayer::perceptrons [protected] |
Vectors of perceptrons which defines the layer. The size of the vector is equal to the number of perceptrons in the layer.
Definition at line 206 of file perceptron_layer.h.
bool OpenNN::PerceptronLayer::display [protected] |