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