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

The empty loss does nothing, letting the user calculate the loss outside the model. More...

#include <empty_loss.hpp>

Public Member Functions

 EmptyLoss ()
 Create the EmptyLoss object.
 
template<typename PredictionType , typename TargetType >
double Forward (const PredictionType &input, const TargetType &target)
 Computes the Empty loss function. 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...
 

Detailed Description

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

The empty loss does nothing, letting the user calculate the loss outside the model.

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).

Member Function Documentation

◆ Backward()

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

Ordinary feed backward pass of a neural network.

Parameters
predictionPrediction used for evaluating the specified loss function.
targetThe target vector.
lossThe calculated error.

◆ Forward()

template<typename InputDataType , typename OutputDataType >
template<typename PredictionType , typename TargetType >
double mlpack::ann::EmptyLoss< InputDataType, OutputDataType >::Forward ( const PredictionType &  input,
const TargetType &  target 
)

Computes the Empty loss function.

Parameters
predictionPrediction used for evaluating the specified loss function.
targetThe target vector.

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