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

Implementation of the MeanPooling. More...

#include <mean_pooling.hpp>

Public Member Functions

 MeanPooling ()
 Create the MeanPooling object.
 
 MeanPooling (const size_t kernelWidth, const size_t kernelHeight, const size_t strideWidth=1, const size_t strideHeight=1, const bool floor=true)
 Create the MeanPooling object using the specified number of units. 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 > &, 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...
 
OutputDataType const & OutputParameter () const
 Get the output parameter.
 
OutputDataType & OutputParameter ()
 Modify the output parameter.
 
OutputDataType const & Delta () const
 Get the delta.
 
OutputDataType & Delta ()
 Modify the delta.
 
size_t const & InputWidth () const
 Get the intput width.
 
size_t & InputWidth ()
 Modify the input width.
 
size_t const & InputHeight () const
 Get the input height.
 
size_t & InputHeight ()
 Modify the input height.
 
size_t const & OutputWidth () const
 Get the output width.
 
size_t & OutputWidth ()
 Modify the output width.
 
size_t const & 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 KernelWidth () const
 Get the kernel width.
 
size_t & KernelWidth ()
 Modify the kernel width.
 
size_t KernelHeight () const
 Get the kernel height.
 
size_t & KernelHeight ()
 Modify the kernel height.
 
size_t StrideWidth () const
 Get the stride width.
 
size_t & StrideWidth ()
 Modify the stride width.
 
size_t StrideHeight () const
 Get the stride height.
 
size_t & StrideHeight ()
 Modify the stride height.
 
bool const & Floor () const
 Get the value of the rounding operation.
 
bool & Floor ()
 Modify the value of the rounding operation.
 
bool Deterministic () const
 Get the value of the deterministic parameter.
 
bool & Deterministic ()
 Modify the value of the deterministic parameter.
 
size_t WeightSize () const
 Get the size of the weights.
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t)
 Serialize the layer.
 

Detailed Description

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

Implementation of the MeanPooling.

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

◆ MeanPooling()

template<typename InputDataType , typename OutputDataType >
mlpack::ann::MeanPooling< InputDataType, OutputDataType >::MeanPooling ( const size_t  kernelWidth,
const size_t  kernelHeight,
const size_t  strideWidth = 1,
const size_t  strideHeight = 1,
const bool  floor = true 
)

Create the MeanPooling object using the specified number of units.

Parameters
kernelWidthWidth of the pooling window.
kernelHeightHeight of the pooling window.
strideWidthWidth of the stride operation.
strideHeightWidth of the stride operation.
floorSet to true to use floor method.

Member Function Documentation

◆ Backward()

template<typename InputDataType , typename OutputDataType >
template<typename eT >
void mlpack::ann::MeanPooling< InputDataType, OutputDataType >::Backward ( const arma::Mat< eT > &  ,
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
*(input) The propagated input activation.
gyThe backpropagated error.
gThe calculated gradient.

◆ Forward()

template<typename InputDataType , typename OutputDataType >
template<typename eT >
void mlpack::ann::MeanPooling< 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: