mlpack  3.0.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
CrossEntropyError< InputDataType, OutputDataType > Class Template Reference

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<typename InputType , typename TargetType , typename OutputType >
void Backward (const InputType &&input, const TargetType &&target, OutputType &&output)
 Ordinary feed backward pass of a neural network. More...
 
OutputDataType & Delta () const
 Get the delta. More...
 
OutputDataType & Delta ()
 Modify the delta. More...
 
double Eps () const
 Get the epsilon. More...
 
double & Eps ()
 Modify the epsilon. More...
 
template<typename InputType , typename TargetType >
double Forward (const InputType &&input, const TargetType &&target)
 
InputDataType & InputParameter () const
 Get the input parameter. More...
 
InputDataType & InputParameter ()
 Modify the input parameter. More...
 
OutputDataType & OutputParameter () const
 Get the output parameter. More...
 
OutputDataType & OutputParameter ()
 Modify the output parameter. More...
 
template<typename Archive >
void serialize (Archive &ar, const unsigned int)
 Serialize the layer. More...
 

Detailed Description

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
class mlpack::ann::CrossEntropyError< InputDataType, OutputDataType >

The cross-entropy performance function measures the network's performance according to the cross-entropy between the input and target distributions.

Template Parameters
InputDataTypeType of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).
OutputDataTypeType of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).

Definition at line 34 of file cross_entropy_error.hpp.

Constructor & Destructor Documentation

CrossEntropyError ( const double  eps = 1e-10)

Create the CrossEntropyError object.

Parameters
epsThe minimum value used for computing logarithms and denominators in a numerically stable way.

Member Function Documentation

void Backward ( const InputType &&  input,
const TargetType &&  target,
OutputType &&  output 
)

Ordinary feed backward pass of a neural network.

Parameters
inputThe propagated input activation.
targetThe target vector.
outputThe calculated error.
OutputDataType& Delta ( ) const
inline

Get the delta.

Definition at line 76 of file cross_entropy_error.hpp.

OutputDataType& Delta ( )
inline

Modify the delta.

Definition at line 78 of file cross_entropy_error.hpp.

double Eps ( ) const
inline

Get the epsilon.

Definition at line 81 of file cross_entropy_error.hpp.

double& Eps ( )
inline

Modify the epsilon.

Definition at line 83 of file cross_entropy_error.hpp.

double Forward ( const InputType &&  input,
const TargetType &&  target 
)
InputDataType& InputParameter ( ) const
inline

Get the input parameter.

Definition at line 66 of file cross_entropy_error.hpp.

InputDataType& InputParameter ( )
inline

Modify the input parameter.

Definition at line 68 of file cross_entropy_error.hpp.

OutputDataType& OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 71 of file cross_entropy_error.hpp.

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 73 of file cross_entropy_error.hpp.

void serialize ( Archive &  ar,
const unsigned  int 
)

Serialize the layer.


The documentation for this class was generated from the following file: