12 #ifndef MLPACK_METHODS_ANN_LAYER_CROSS_ENTROPY_ERROR_HPP 13 #define MLPACK_METHODS_ANN_LAYER_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);
60 template<
typename InputType,
typename TargetType,
typename OutputType>
61 void Backward(
const InputType&& input,
62 const TargetType&& target,
76 OutputDataType&
Delta()
const {
return delta; }
78 OutputDataType&
Delta() {
return delta; }
81 double Eps()
const {
return eps; }
83 double&
Eps() {
return eps; }
88 template<
typename Archive>
89 void serialize(Archive& ar,
const unsigned int );
96 InputDataType inputParameter;
99 OutputDataType outputParameter;
109 #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.
OutputDataType & Delta()
Modify the delta.
InputDataType & InputParameter() const
Get the input parameter.
double Eps() const
Get the epsilon.
double Forward(const InputType &&input, const TargetType &&target)
CrossEntropyError(double eps=1e-10)
Create the CrossEntropyError object.
OutputDataType & OutputParameter() const
Get the output parameter.
OutputDataType & Delta() const
Get the delta.
The cross-entropy performance function measures the network's performance according to the cross-entr...
double & Eps()
Modify the epsilon.
InputDataType & InputParameter()
Modify the input parameter.
OutputDataType & OutputParameter()
Modify the output parameter.