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

Implementation of the concat performance class. More...

Public Member Functions

 ConcatPerformance (const size_t inSize, OutputLayerType &&outputLayer=OutputLayerType())
 Create the ConcatPerformance object. More...
 
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 & Delta () const
 Get the delta. More...
 
OutputDataType & Delta ()
 Modify the delta. More...
 
template<typename eT >
double Forward (const arma::Mat< eT > &&input, arma::Mat< eT > &&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 &, const unsigned int)
 Serialize the layer. More...
 

Private Attributes

OutputDataType delta
 Locally-stored delta object. More...
 
InputDataType inputParameter
 Locally-stored input parameter object. More...
 
size_t inSize
 Locally-stored number of inputs. More...
 
OutputLayerType outputLayer
 Instantiated outputlayer used to evaluate the network. More...
 
OutputDataType outputParameter
 Locally-stored output parameter object. More...
 

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

Definition at line 39 of file concat_performance.hpp.

Constructor & Destructor Documentation

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

Create the ConcatPerformance object.

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

Member Function Documentation

template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
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.
template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType& mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::Delta ( ) const
inline
template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType& mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::Delta ( )
inline
template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
template<typename eT >
double mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::Forward ( const arma::Mat< eT > &&  input,
arma::Mat< eT > &&  target 
)
template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
InputDataType& mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::InputParameter ( ) const
inline
template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
InputDataType& mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::InputParameter ( )
inline
template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType& mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::OutputParameter ( ) const
inline
template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType& mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::OutputParameter ( )
inline
template<typename OutputLayerType = NegativeLogLikelihood<>, typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
template<typename Archive >
void mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::Serialize ( Archive &  ,
const unsigned  int 
)

Member Data Documentation

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

Locally-stored delta object.

Definition at line 104 of file concat_performance.hpp.

Referenced by mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::Delta().

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

Locally-stored input parameter object.

Definition at line 107 of file concat_performance.hpp.

Referenced by mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::InputParameter().

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

Locally-stored number of inputs.

Definition at line 98 of file concat_performance.hpp.

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

Instantiated outputlayer used to evaluate the network.

Definition at line 101 of file concat_performance.hpp.

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

Locally-stored output parameter object.

Definition at line 110 of file concat_performance.hpp.

Referenced by mlpack::ann::ConcatPerformance< OutputLayerType, InputDataType, OutputDataType >::OutputParameter().


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