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

Implementation of the AdaptiveMeanPooling. More...

#include <adaptive_mean_pooling.hpp>

Public Member Functions

 AdaptiveMeanPooling ()
 Create the AdaptiveMeanPooling object.
 
 AdaptiveMeanPooling (const size_t outputWidth, const size_t outputHeight)
 Create the AdaptiveMeanPooling object. More...
 
 AdaptiveMeanPooling (const std::tuple< size_t, size_t > &outputShape)
 Create the AdaptiveMeanPooling object. More...
 
template<typename eT >
void Forward (const arma::Mat< eT > &input, arma::Mat< eT > &output)
 Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. More...
 
template<typename eT >
void Backward (const arma::Mat< eT > &input, const arma::Mat< eT > &gy, arma::Mat< eT > &g)
 Ordinary feed backward pass of a neural network, using 3rd-order tensors as input, calculating the function f(x) by propagating x backwards through f. More...
 
const OutputDataType & OutputParameter () const
 Get the output parameter.
 
OutputDataType & OutputParameter ()
 Modify the output parameter.
 
const OutputDataType & Delta () const
 Get the delta.
 
OutputDataType & Delta ()
 Modify the delta.
 
size_t InputWidth () const
 Get the input width.
 
size_t & InputWidth ()
 Modify the input width.
 
size_t InputHeight () const
 Get the input height.
 
size_t & InputHeight ()
 Modify the input height.
 
size_t OutputWidth () const
 Get the output width.
 
size_t & OutputWidth ()
 Modify the output width.
 
size_t OutputHeight () const
 Get the output height.
 
size_t & OutputHeight ()
 Modify the output height.
 
size_t InputSize () const
 Get the input size.
 
size_t OutputSize () const
 Get the output size.
 
size_t WeightSize () const
 Get the size of the weights.
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t version)
 Serialize the layer.
 

Detailed Description

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

Implementation of the AdaptiveMeanPooling.

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

◆ AdaptiveMeanPooling() [1/2]

template<typename InputDataType , typename OutputDataType >
mlpack::ann::AdaptiveMeanPooling< InputDataType, OutputDataType >::AdaptiveMeanPooling ( const size_t  outputWidth,
const size_t  outputHeight 
)

Create the AdaptiveMeanPooling object.

Parameters
outputWidthWidth of the output.
outputHeightHeight of the output.

◆ AdaptiveMeanPooling() [2/2]

template<typename InputDataType , typename OutputDataType >
mlpack::ann::AdaptiveMeanPooling< InputDataType, OutputDataType >::AdaptiveMeanPooling ( const std::tuple< size_t, size_t > &  outputShape)

Create the AdaptiveMeanPooling object.

Parameters
outputShapeA two-value tuple indicating width and height of the output.

Member Function Documentation

◆ Backward()

template<typename InputDataType , typename OutputDataType >
template<typename eT >
void mlpack::ann::AdaptiveMeanPooling< InputDataType, OutputDataType >::Backward ( const arma::Mat< eT > &  input,
const arma::Mat< eT > &  gy,
arma::Mat< eT > &  g 
)

Ordinary feed backward pass of a neural network, using 3rd-order tensors as input, calculating the function f(x) by propagating x backwards through f.

Using the results from the feed forward pass.

Parameters
inputThe propagated input activation.
gyThe backpropagated error.
gThe calculated gradient.

◆ Forward()

template<typename InputDataType , typename OutputDataType >
template<typename eT >
void mlpack::ann::AdaptiveMeanPooling< InputDataType, OutputDataType >::Forward ( const arma::Mat< eT > &  input,
arma::Mat< eT > &  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.

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