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

Implementation of the AddMerge module class. More...

Public Member Functions

 AddMerge ()
 Create the AddMerge object. More...
 
void Add (LayerTypes layer)
 
template<typename LayerType >
void Add (const LayerType &layer)
 
template<class LayerType , class... Args>
void Add (Args...args)
 
template<typename eT >
void Backward (const arma::Mat< eT > &&, arma::Mat< eT > &&gy, arma::Mat< eT > &&g)
 Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards trough f. More...
 
OutputDataType const & Delta () const
 Get the delta. More...
 
OutputDataType & Delta ()
 Modify the delta. More...
 
template<typename InputType , typename OutputType >
void Forward (const InputType &&, OutputType &&output)
 Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. More...
 
InputDataType const & InputParameter () const
 Get the input parameter. More...
 
InputDataType & InputParameter ()
 Modify the input parameter. More...
 
OutputDataType const & 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...
 

Private Attributes

DeleteVisitor deleteVisitor
 Locally-stored delete visitor module object. More...
 
OutputDataType delta
 Locally-stored delta object. More...
 
DeltaVisitor deltaVisitor
 Locally-stored delta visitor module object. More...
 
InputDataType inputParameter
 Locally-stored input parameter object. More...
 
std::vector< LayerTypesnetwork
 
OutputDataType outputParameter
 Locally-stored output parameter object. More...
 
OutputParameterVisitor outputParameterVisitor
 Locally-stored output parameter visitor module object. More...
 

Detailed Description

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

Implementation of the AddMerge module class.

The AddMerge class accumulates the output of various modules.

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 40 of file add_merge.hpp.

Constructor & Destructor Documentation

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
mlpack::ann::AddMerge< InputDataType, OutputDataType >::AddMerge ( )

Create the AddMerge object.

Member Function Documentation

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Add ( LayerTypes  layer)
inline
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
template<typename LayerType >
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Add ( const LayerType &  layer)
inline
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
template<class LayerType , class... Args>
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Add ( Args...  args)
inline
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
template<typename eT >
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Backward ( const arma::Mat< eT > &&  ,
arma::Mat< eT > &&  gy,
arma::Mat< eT > &&  g 
)

Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards trough f.

Using the results from the feed forward pass.

Parameters
inputThe propagated input activation.
gyThe backpropagated error.
gThe calculated gradient.
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType const& mlpack::ann::AddMerge< InputDataType, OutputDataType >::Delta ( ) const
inline

Get the delta.

Definition at line 104 of file add_merge.hpp.

References mlpack::ann::AddMerge< InputDataType, OutputDataType >::delta.

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType& mlpack::ann::AddMerge< InputDataType, OutputDataType >::Delta ( )
inline
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
template<typename InputType , typename OutputType >
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Forward ( const InputType &&  ,
OutputType &&  output 
)

Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f.

Parameters
inputInput data used for evaluating the specified function.
outputResulting output activation.
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
InputDataType const& mlpack::ann::AddMerge< InputDataType, OutputDataType >::InputParameter ( ) const
inline

Get the input parameter.

Definition at line 94 of file add_merge.hpp.

References mlpack::ann::AddMerge< InputDataType, OutputDataType >::inputParameter.

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
InputDataType& mlpack::ann::AddMerge< InputDataType, OutputDataType >::InputParameter ( )
inline

Modify the input parameter.

Definition at line 96 of file add_merge.hpp.

References mlpack::ann::AddMerge< InputDataType, OutputDataType >::inputParameter.

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType const& mlpack::ann::AddMerge< InputDataType, OutputDataType >::OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 99 of file add_merge.hpp.

References mlpack::ann::AddMerge< InputDataType, OutputDataType >::outputParameter.

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType& mlpack::ann::AddMerge< InputDataType, OutputDataType >::OutputParameter ( )
inline

Modify the output parameter.

Definition at line 101 of file add_merge.hpp.

References mlpack::ann::AddMerge< InputDataType, OutputDataType >::outputParameter.

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
template<typename Archive >
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Serialize ( Archive &  ar,
const unsigned  int 
)

Member Data Documentation

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
DeleteVisitor mlpack::ann::AddMerge< InputDataType, OutputDataType >::deleteVisitor
private

Locally-stored delete visitor module object.

Definition at line 118 of file add_merge.hpp.

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType mlpack::ann::AddMerge< InputDataType, OutputDataType >::delta
private

Locally-stored delta object.

Definition at line 127 of file add_merge.hpp.

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

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
DeltaVisitor mlpack::ann::AddMerge< InputDataType, OutputDataType >::deltaVisitor
private

Locally-stored delta visitor module object.

Definition at line 124 of file add_merge.hpp.

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
InputDataType mlpack::ann::AddMerge< InputDataType, OutputDataType >::inputParameter
private

Locally-stored input parameter object.

Definition at line 130 of file add_merge.hpp.

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

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
std::vector<LayerTypes> mlpack::ann::AddMerge< InputDataType, OutputDataType >::network
private
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputDataType mlpack::ann::AddMerge< InputDataType, OutputDataType >::outputParameter
private

Locally-stored output parameter object.

Definition at line 133 of file add_merge.hpp.

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

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
OutputParameterVisitor mlpack::ann::AddMerge< InputDataType, OutputDataType >::outputParameterVisitor
private

Locally-stored output parameter visitor module object.

Definition at line 121 of file add_merge.hpp.


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