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 typename InputType::elem_type
Forward(
const InputType& input,
53 const TargetType& target);
62 template<
typename InputType,
typename TargetType,
typename OutputType>
63 void Backward(
const InputType& input,
64 const TargetType& target,
73 double Eps()
const {
return eps; }
75 double&
Eps() {
return eps; }
80 template<
typename Archive>
81 void serialize(Archive& ar,
const unsigned int );
85 OutputDataType outputParameter;
95 #include "cross_entropy_error_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
double Eps() const
Get the epsilon.
void Backward(const InputType &input, const TargetType &target, OutputType &output)
Ordinary feed backward pass of a neural network.
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.
InputType::elem_type Forward(const InputType &input, const TargetType &target)
Computes the cross-entropy function.
OutputDataType & OutputParameter()
Modify the output parameter.