Implementation of the MaxPooling layer.
More...
#include <max_pooling.hpp>
|
| MaxPooling () |
| Create the MaxPooling object.
|
|
| MaxPooling (const size_t kernelWidth, const size_t kernelHeight, const size_t strideWidth=1, const size_t strideHeight=1, const bool floor=true) |
| Create the MaxPooling 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...
|
|
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 | 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 | 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.
|
|
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
class mlpack::ann::MaxPooling< InputDataType, OutputDataType >
Implementation of the MaxPooling layer.
- Template Parameters
-
InputDataType | Type of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
OutputDataType | Type of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
◆ MaxPooling()
template<typename InputDataType , typename OutputDataType >
mlpack::ann::MaxPooling< InputDataType, OutputDataType >::MaxPooling |
( |
const size_t |
kernelWidth, |
|
|
const size_t |
kernelHeight, |
|
|
const size_t |
strideWidth = 1 , |
|
|
const size_t |
strideHeight = 1 , |
|
|
const bool |
floor = true |
|
) |
| |
Create the MaxPooling object using the specified number of units.
- Parameters
-
kernelWidth | Width of the pooling window. |
kernelHeight | Height of the pooling window. |
strideWidth | Width of the stride operation. |
strideHeight | Width of the stride operation. |
floor | Rounding operator (floor or ceil). |
◆ Backward()
template<typename InputDataType , typename OutputDataType >
template<typename eT >
void mlpack::ann::MaxPooling< 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. |
gy | The backpropagated error. |
g | The calculated gradient. |
◆ Forward()
template<typename InputDataType , typename OutputDataType >
template<typename eT >
void mlpack::ann::MaxPooling< 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
-
input | Input data used for evaluating the specified function. |
output | Resulting output activation. |
The documentation for this class was generated from the following files: