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

Implementation of the concat performance class. More...

#include <concat_performance.hpp>

Public Member Functions

 ConcatPerformance (const size_t inSize=0, OutputLayerType &&outputLayer=OutputLayerType())
 Create the ConcatPerformance object. More...
 
template<typename eT >
double Forward (const arma::Mat< eT > &input, arma::Mat< eT > &target)
 
template<typename eT >
void Backward (const arma::Mat< eT > &input, const arma::Mat< eT > &target, arma::Mat< eT > &output)
 Ordinary feed backward pass of a neural network. More...
 
OutputDataType & OutputParameter () const
 Get the output parameter.
 
OutputDataType & OutputParameter ()
 Modify the output parameter.
 
OutputDataType & Delta () const
 Get the delta.
 
OutputDataType & Delta ()
 Modify the delta.
 
size_t InSize () const
 Get the number of inputs.
 
template<typename Archive >
void serialize (Archive &, const uint32_t)
 Serialize the layer.
 

Detailed Description

template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
class mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >

Implementation of the concat performance class.

The class works as a feed-forward fully connected network container which plugs performance layers together.

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

Constructor & Destructor Documentation

◆ ConcatPerformance()

template<typename OutputLayerType , typename InputDataType , typename OutputDataType >
mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::ConcatPerformance ( const size_t  inSize = 0,
OutputLayerType &&  outputLayer = OutputLayerType() 
)

Create the ConcatPerformance object.

Parameters
inSizeThe number of inputs.
outputLayerOutput layer used to evaluate the network.

Member Function Documentation

◆ Backward()

template<typename OutputLayerType , typename InputDataType , typename OutputDataType >
template<typename eT >
void mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::Backward ( const arma::Mat< eT > &  input,
const arma::Mat< eT > &  target,
arma::Mat< eT > &  output 
)

Ordinary feed backward pass of a neural network.

The negative log likelihood layer expectes that the input contains log-probabilities for each class. The layer also expects a class index, in the range between 1 and the number of classes, as target when calling the Forward function.

Parameters
inputThe propagated input activation.
targetThe target vector, that contains the class index in the range between 1 and the number of classes.
outputThe calculated error.

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