mlpack
Public Member Functions | List of all members
mlpack::ann::ReconstructionLoss< InputDataType, OutputDataType, DistType > Class Template Reference

The reconstruction loss performance function measures the network's performance equal to the negative log probability of the target with the input distribution. More...

#include <reconstruction_loss.hpp>

Public Member Functions

 ReconstructionLoss ()
 Create the ReconstructionLoss object.
 
template<typename PredictionType , typename TargetType >
PredictionType::elem_type Forward (const PredictionType &prediction, const TargetType &target)
 Computes the reconstruction loss. More...
 
template<typename PredictionType , typename TargetType , typename LossType >
void Backward (const PredictionType &prediction, const TargetType &target, LossType &loss)
 Ordinary feed backward pass of a neural network. More...
 
OutputDataType & OutputParameter () const
 Get the output parameter.
 
OutputDataType & OutputParameter ()
 Modify the output parameter.
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t)
 Serialize the layer.
 

Detailed Description

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat, typename DistType = BernoulliDistribution<InputDataType>>
class mlpack::ann::ReconstructionLoss< InputDataType, OutputDataType, DistType >

The reconstruction loss performance function measures the network's performance equal to the negative log probability of the target with the input distribution.

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).
DistTypeThe type of distribution parametrized by the input.

Member Function Documentation

◆ Backward()

template<typename InputDataType , typename OutputDataType , typename DistType >
template<typename PredictionType , typename TargetType , typename LossType >
void mlpack::ann::ReconstructionLoss< InputDataType, OutputDataType, DistType >::Backward ( const PredictionType &  prediction,
const TargetType &  target,
LossType &  loss 
)

Ordinary feed backward pass of a neural network.

Parameters
predictionPredictions used for evaluating the specified loss function.
targetThe target matrix.
lossThe calculated error.

◆ Forward()

template<typename InputDataType , typename OutputDataType , typename DistType >
template<typename PredictionType , typename TargetType >
PredictionType::elem_type mlpack::ann::ReconstructionLoss< InputDataType, OutputDataType, DistType >::Forward ( const PredictionType &  prediction,
const TargetType &  target 
)

Computes the reconstruction loss.

Parameters
predictionPredictions used for evaluating the specified loss function.
targetThe target matrix.

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