\section{Padding$<$ Input\+Data\+Type, Output\+Data\+Type $>$ Class Template Reference}
\label{classmlpack_1_1ann_1_1Padding}\index{Padding$<$ Input\+Data\+Type, Output\+Data\+Type $>$@{Padding$<$ Input\+Data\+Type, Output\+Data\+Type $>$}}


Implementation of the \doxyref{Padding}{p.}{classmlpack_1_1ann_1_1Padding} module class.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Padding} (const size\+\_\+t pad\+W\+Left=0, const size\+\_\+t pad\+W\+Right=0, const size\+\_\+t pad\+H\+Top=0, const size\+\_\+t pad\+H\+Bottom=0)
\begin{DoxyCompactList}\small\item\em Create the \doxyref{Padding}{p.}{classmlpack_1_1ann_1_1Padding} object using the specified number of output units. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename eT $>$ }\\void \textbf{ Backward} (const arma\+::\+Mat$<$ eT $>$ \&, const arma\+::\+Mat$<$ eT $>$ \&gy, arma\+::\+Mat$<$ eT $>$ \&g)
\begin{DoxyCompactList}\small\item\em Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards trough f. \end{DoxyCompactList}\item 
Output\+Data\+Type const  \& \textbf{ Delta} () const
\begin{DoxyCompactList}\small\item\em Get the delta. \end{DoxyCompactList}\item 
Output\+Data\+Type \& \textbf{ Delta} ()
\begin{DoxyCompactList}\small\item\em Modify the delta. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename eT $>$ }\\void \textbf{ Forward} (const arma\+::\+Mat$<$ eT $>$ \&input, arma\+::\+Mat$<$ eT $>$ \&output)
\begin{DoxyCompactList}\small\item\em Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. \end{DoxyCompactList}\item 
Output\+Data\+Type const  \& \textbf{ Output\+Parameter} () const
\begin{DoxyCompactList}\small\item\em Get the output parameter. \end{DoxyCompactList}\item 
Output\+Data\+Type \& \textbf{ Output\+Parameter} ()
\begin{DoxyCompactList}\small\item\em Modify the output parameter. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Pad\+H\+Bottom} () const
\begin{DoxyCompactList}\small\item\em Get the bottom padding width. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Pad\+H\+Bottom} ()
\begin{DoxyCompactList}\small\item\em Modify the bottom padding width. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Pad\+H\+Top} () const
\begin{DoxyCompactList}\small\item\em Get the top padding width. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Pad\+H\+Top} ()
\begin{DoxyCompactList}\small\item\em Modify the top padding width. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Pad\+W\+Left} () const
\begin{DoxyCompactList}\small\item\em Get the left padding width. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Pad\+W\+Left} ()
\begin{DoxyCompactList}\small\item\em Modify the left padding width. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Pad\+W\+Right} () const
\begin{DoxyCompactList}\small\item\em Get the right padding width. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Pad\+W\+Right} ()
\begin{DoxyCompactList}\small\item\em Modify the right padding width. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the layer. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Input\+Data\+Type = arma\+::mat, typename Output\+Data\+Type = arma\+::mat$>$\newline
class mlpack\+::ann\+::\+Padding$<$ Input\+Data\+Type, Output\+Data\+Type $>$}

Implementation of the \doxyref{Padding}{p.}{classmlpack_1_1ann_1_1Padding} module class. 

The \doxyref{Padding}{p.}{classmlpack_1_1ann_1_1Padding} module applies a bias term to the incoming data.


\begin{DoxyTemplParams}{Template Parameters}
{\em Input\+Data\+Type} & Type of the input data (arma\+::colvec, arma\+::mat, arma\+::sp\+\_\+mat or arma\+::cube). \\
\hline
{\em Output\+Data\+Type} & Type of the output data (arma\+::colvec, arma\+::mat, arma\+::sp\+\_\+mat or arma\+::cube). \\
\hline
\end{DoxyTemplParams}


Definition at line 77 of file layer\+\_\+types.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1ann_1_1Padding_a2150bc3c82974beedf54864c4ab933ab}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Padding@{Padding}}
\index{Padding@{Padding}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Padding()}
{\footnotesize\ttfamily \textbf{ Padding} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{pad\+W\+Left = {\ttfamily 0},  }\item[{const size\+\_\+t}]{pad\+W\+Right = {\ttfamily 0},  }\item[{const size\+\_\+t}]{pad\+H\+Top = {\ttfamily 0},  }\item[{const size\+\_\+t}]{pad\+H\+Bottom = {\ttfamily 0} }\end{DoxyParamCaption})}



Create the \doxyref{Padding}{p.}{classmlpack_1_1ann_1_1Padding} object using the specified number of output units. 


\begin{DoxyParams}{Parameters}
{\em pad\+W\+Left} & Left padding width of the input. \\
\hline
{\em pad\+W\+Right} & Right padding width of the input. \\
\hline
{\em pad\+H\+Top} & Top padding height of the input. \\
\hline
{\em pad\+H\+Bottom} & Bottom padding height of the input. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1ann_1_1Padding_ad9ad1a3bdb0f3fff5c839ed155e4bbf8}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Backward@{Backward}}
\index{Backward@{Backward}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Backward()}
{\footnotesize\ttfamily void Backward (\begin{DoxyParamCaption}\item[{const arma\+::\+Mat$<$ eT $>$ \&}]{,  }\item[{const arma\+::\+Mat$<$ eT $>$ \&}]{gy,  }\item[{arma\+::\+Mat$<$ eT $>$ \&}]{g }\end{DoxyParamCaption})}



Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards trough f. 

Using the results from the feed forward pass.


\begin{DoxyParams}{Parameters}
{\em $\ast$} & (input) The propagated input activation. \\
\hline
{\em gy} & The backpropagated error. \\
\hline
{\em g} & The calculated gradient. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1ann_1_1Padding_a797f7edb44dd081e5e2b3cc316eef6bd}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Delta@{Delta}}
\index{Delta@{Delta}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Delta()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Output\+Data\+Type const\& Delta (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the delta. 



Definition at line 80 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_ad6601342d560219ce951d554e69e5e87}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Delta@{Delta}}
\index{Delta@{Delta}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Delta()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Output\+Data\+Type\& Delta (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the delta. 



Definition at line 82 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a461f849bc638c15bec262dc9c3a58abe}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Forward@{Forward}}
\index{Forward@{Forward}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Forward()}
{\footnotesize\ttfamily void Forward (\begin{DoxyParamCaption}\item[{const arma\+::\+Mat$<$ eT $>$ \&}]{input,  }\item[{arma\+::\+Mat$<$ eT $>$ \&}]{output }\end{DoxyParamCaption})}



Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. 


\begin{DoxyParams}{Parameters}
{\em input} & Input data used for evaluating the specified function. \\
\hline
{\em output} & Resulting output activation. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1ann_1_1Padding_a0ee21c2a36e5abad1e7a9d5dd00849f9}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Output\+Parameter@{Output\+Parameter}}
\index{Output\+Parameter@{Output\+Parameter}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Output\+Parameter()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Output\+Data\+Type const\& Output\+Parameter (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the output parameter. 



Definition at line 75 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a21d5f745f02c709625a4ee0907f004a5}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Output\+Parameter@{Output\+Parameter}}
\index{Output\+Parameter@{Output\+Parameter}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Output\+Parameter()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Output\+Data\+Type\& Output\+Parameter (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the output parameter. 



Definition at line 77 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a7772e9861fa1c1922b00428172315939}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Pad\+H\+Bottom@{Pad\+H\+Bottom}}
\index{Pad\+H\+Bottom@{Pad\+H\+Bottom}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Pad\+H\+Bottom()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Pad\+H\+Bottom (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the bottom padding width. 



Definition at line 100 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a49d01b2dacca58ba01d883045100b823}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Pad\+H\+Bottom@{Pad\+H\+Bottom}}
\index{Pad\+H\+Bottom@{Pad\+H\+Bottom}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Pad\+H\+Bottom()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Pad\+H\+Bottom (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the bottom padding width. 



Definition at line 102 of file padding.\+hpp.



References Padding$<$ Input\+Data\+Type, Output\+Data\+Type $>$\+::serialize().

\mbox{\label{classmlpack_1_1ann_1_1Padding_ae6d766575008c2909e51d00b1ef619a1}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Pad\+H\+Top@{Pad\+H\+Top}}
\index{Pad\+H\+Top@{Pad\+H\+Top}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Pad\+H\+Top()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Pad\+H\+Top (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the top padding width. 



Definition at line 95 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a9ea976eb369189ecbe7be7e53e323d5e}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Pad\+H\+Top@{Pad\+H\+Top}}
\index{Pad\+H\+Top@{Pad\+H\+Top}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Pad\+H\+Top()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Pad\+H\+Top (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the top padding width. 



Definition at line 97 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a353cb5238a6b33f0d740c3ab17da11b4}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Pad\+W\+Left@{Pad\+W\+Left}}
\index{Pad\+W\+Left@{Pad\+W\+Left}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Pad\+W\+Left()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Pad\+W\+Left (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the left padding width. 



Definition at line 85 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a10cf922741cd487e0904c933e6500760}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Pad\+W\+Left@{Pad\+W\+Left}}
\index{Pad\+W\+Left@{Pad\+W\+Left}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Pad\+W\+Left()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Pad\+W\+Left (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the left padding width. 



Definition at line 87 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a7f164b19d31d8d4ec4988513c139bf55}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Pad\+W\+Right@{Pad\+W\+Right}}
\index{Pad\+W\+Right@{Pad\+W\+Right}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Pad\+W\+Right()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Pad\+W\+Right (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the right padding width. 



Definition at line 90 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_a97efc672230a48247bd19a1bcd51624f}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!Pad\+W\+Right@{Pad\+W\+Right}}
\index{Pad\+W\+Right@{Pad\+W\+Right}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{Pad\+W\+Right()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Pad\+W\+Right (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the right padding width. 



Definition at line 92 of file padding.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Padding_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::ann\+::\+Padding@{mlpack\+::ann\+::\+Padding}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})}



Serialize the layer. 



Referenced by Padding$<$ Input\+Data\+Type, Output\+Data\+Type $>$\+::\+Pad\+H\+Bottom().



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+2/src/mlpack/methods/ann/layer/\textbf{ layer\+\_\+types.\+hpp}\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+2/src/mlpack/methods/ann/layer/\textbf{ padding.\+hpp}\end{DoxyCompactItemize}
