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
45 Padding(
const size_t padWLeft = 0,
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);
70 void Backward(
const arma::Mat<eT>&& ,
71 const arma::Mat<eT>&& gy,
80 OutputDataType
const&
Delta()
const {
return delta; }
82 OutputDataType&
Delta() {
return delta; }
87 template<
typename Archive>
88 void serialize(Archive& ar,
const unsigned int );
107 OutputDataType delta;
110 OutputDataType outputParameter;
117 #include "padding_impl.hpp"
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.
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...
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType const & OutputParameter() const
Get the output parameter.
OutputDataType const & Delta() const
Get the delta.
OutputDataType & OutputParameter()
Modify the output parameter.
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...
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Delta()
Modify the delta.