12 #ifndef MLPACK_METHODS_ANN_LOSS_FUNCTIONS_CROSS_ENTROPY_ERROR_HPP 13 #define MLPACK_METHODS_ANN_LOSS_FUNCTIONS_CROSS_ENTROPY_ERROR_HPP 31 typename InputDataType = arma::mat,
32 typename OutputDataType = arma::mat
51 template<
typename InputType,
typename TargetType>
52 double Forward(
const InputType&& input,
const TargetType&& target);
61 template<
typename InputType,
typename TargetType,
typename OutputType>
62 void Backward(
const InputType&& input,
63 const TargetType&& target,
72 double Eps()
const {
return eps; }
74 double&
Eps() {
return eps; }
79 template<
typename Archive>
80 void serialize(Archive& ar,
const unsigned int );
84 OutputDataType outputParameter;
94 #include "cross_entropy_error_impl.hpp"
The core includes that mlpack expects; standard C++ includes and Armadillo.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
void Backward(const InputType &&input, const TargetType &&target, OutputType &&output)
Ordinary feed backward pass of a neural network.
double Eps() const
Get the epsilon.
double Forward(const InputType &&input, const TargetType &&target)
Computes the cross-entropy function.
OutputDataType & OutputParameter() const
Get the output parameter.
The cross-entropy performance function measures the network's performance according to the cross-entr...
CrossEntropyError(const double eps=1e-10)
Create the CrossEntropyError object.
double & Eps()
Modify the epsilon.
OutputDataType & OutputParameter()
Modify the output parameter.