12#ifndef MLPACK_METHODS_ANN_LAYER_PADDING_HPP
13#define MLPACK_METHODS_ANN_LAYER_PADDING_HPP
31 typename InputDataType = arma::mat,
32 typename OutputDataType = arma::mat
46 const size_t padWRight = 0,
47 const size_t padHTop = 0,
48 const size_t padHBottom = 0);
58 void Forward(
const arma::Mat<eT>& input, arma::Mat<eT>& output);
71 const arma::Mat<eT>& gy,
80 OutputDataType
const&
Delta()
const {
return delta; }
82 OutputDataType&
Delta() {
return delta; }
95 size_t PadHTop()
const {
return padHTop; }
107 template<
typename Archive>
127 OutputDataType delta;
130 OutputDataType outputParameter;
137#include "padding_impl.hpp"
Implementation of the Padding module class.
OutputDataType const & Delta() const
Get the delta.
Padding(const size_t padWLeft=0, const size_t padWRight=0, const size_t padHTop=0, const size_t padHBottom=0)
Create the Padding object using the specified number of output units.
size_t & PadHTop()
Modify the top padding width.
size_t PadWLeft() const
Get the left padding width.
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 activ...
OutputDataType const & OutputParameter() const
Get the output parameter.
size_t & PadHBottom()
Modify the bottom padding width.
size_t PadHBottom() const
Get the bottom padding width.
size_t PadWRight() const
Get the right padding width.
size_t & PadWRight()
Modify the right padding width.
size_t & PadWLeft()
Modify the left padding width.
void Backward(const arma::Mat< eT > &, const arma::Mat< eT > &gy, arma::Mat< eT > &g)
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...
OutputDataType & OutputParameter()
Modify the output parameter.
size_t PadHTop() const
Get the top padding width.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Delta()
Modify the delta.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.