The cross-entropy performance function measures the network's performance according to the cross-entropy between the input and target distributions. More...
Public Member Functions | |
CrossEntropyError (const double eps=1e-10) | |
Create the CrossEntropyError object. More... | |
template | |
void | Backward (const InputType &input, const TargetType &target, OutputType &output) |
Ordinary feed backward pass of a neural network. More... | |
double | Eps () const |
Get the epsilon. More... | |
double & | Eps () |
Modify the epsilon. More... | |
template | |
InputType::elem_type | Forward (const InputType &input, const TargetType &target) |
Computes the cross-entropy function. More... | |
OutputDataType & | OutputParameter () const |
Get the output parameter. More... | |
OutputDataType & | OutputParameter () |
Modify the output parameter. More... | |
template | |
void | serialize (Archive &ar, const unsigned int) |
Serialize the layer. More... | |
The cross-entropy performance function measures the network's performance according to the cross-entropy between the input and target distributions.
InputDataType | Type of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
OutputDataType | Type of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
Definition at line 34 of file cross_entropy_error.hpp.
CrossEntropyError | ( | const double | eps = 1e-10 | ) |
Create the CrossEntropyError object.
eps | The minimum value used for computing logarithms and denominators in a numerically stable way. |
void Backward | ( | const InputType & | input, |
const TargetType & | target, | ||
OutputType & | output | ||
) |
Ordinary feed backward pass of a neural network.
input | The propagated input activation. |
target | The target vector. |
output | The calculated error. |
|
inline |
Get the epsilon.
Definition at line 73 of file cross_entropy_error.hpp.
|
inline |
Modify the epsilon.
Definition at line 75 of file cross_entropy_error.hpp.
References CrossEntropyError< InputDataType, OutputDataType >::serialize().
InputType::elem_type Forward | ( | const InputType & | input, |
const TargetType & | target | ||
) |
Computes the cross-entropy function.
input | Input data used for evaluating the specified function. |
target | The target vector. |
|
inline |
Get the output parameter.
Definition at line 68 of file cross_entropy_error.hpp.
|
inline |
Modify the output parameter.
Definition at line 70 of file cross_entropy_error.hpp.
void serialize | ( | Archive & | ar, |
const unsigned | int | ||
) |
Serialize the layer.
Referenced by CrossEntropyError< InputDataType, OutputDataType >::Eps().