\section{Alpha\+Dropout$<$ Input\+Data\+Type, Output\+Data\+Type $>$ Class Template Reference}
\label{classmlpack_1_1ann_1_1AlphaDropout}\index{Alpha\+Dropout$<$ Input\+Data\+Type, Output\+Data\+Type $>$@{Alpha\+Dropout$<$ Input\+Data\+Type, Output\+Data\+Type $>$}}


The alpha -\/ dropout layer is a regularizer that randomly with probability \textquotesingle{}ratio\textquotesingle{} sets input values to alpha\+Dash.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Alpha\+Dropout} (const double ratio=0.\+5, const double alpha\+Dash=-\/alpha $\ast$lambda)
\begin{DoxyCompactList}\small\item\em Create the Alpha\+\_\+\+Dropout object using the specified ratio. \end{DoxyCompactList}\item 
double \textbf{ A} () const
\begin{DoxyCompactList}\small\item\em Value to be multiplied with x for affine transformation. \end{DoxyCompactList}\item 
double \textbf{ Alpha\+Dash} () const
\begin{DoxyCompactList}\small\item\em Value of alpha\+Dash. \end{DoxyCompactList}\item 
double \textbf{ B} () const
\begin{DoxyCompactList}\small\item\em Value to be added to a$\ast$x for affine transformation. \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 the alpha\+\_\+dropout layer. \end{DoxyCompactList}\item 
Output\+Data\+Type const  \& \textbf{ Delta} () const
\begin{DoxyCompactList}\small\item\em Get the detla. \end{DoxyCompactList}\item 
Output\+Data\+Type \& \textbf{ Delta} ()
\begin{DoxyCompactList}\small\item\em Modify the delta. \end{DoxyCompactList}\item 
bool \textbf{ Deterministic} () const
\begin{DoxyCompactList}\small\item\em The value of the deterministic parameter. \end{DoxyCompactList}\item 
bool \& \textbf{ Deterministic} ()
\begin{DoxyCompactList}\small\item\em Modify the value of the deterministic parameter. \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 the alpha\+\_\+dropout layer. \end{DoxyCompactList}\item 
Output\+Data\+Type const  \& \textbf{ Mask} () const
\begin{DoxyCompactList}\small\item\em Get the mask. \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 
double \textbf{ Ratio} () const
\begin{DoxyCompactList}\small\item\em The probability of setting a value to alpha\+Dash. \end{DoxyCompactList}\item 
void \textbf{ Ratio} (const double r)
\begin{DoxyCompactList}\small\item\em Modify the probability of setting a value to alpha\+Dash. \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\+::\+Alpha\+Dropout$<$ Input\+Data\+Type, Output\+Data\+Type $>$}

The alpha -\/ dropout layer is a regularizer that randomly with probability \textquotesingle{}ratio\textquotesingle{} sets input values to alpha\+Dash. 

The alpha -\/ dropout layer is mostly used for S\+E\+LU activation function where successive layers don\textquotesingle{}t have same mean and variance.

For more information, see the following.


\begin{DoxyCode}
@article\{Klambauer2017,
  author  = \{Gunter Klambauer and Thomas Unterthiner and
             Andreas Mayr\},
  title   = \{Self-Normalizing Neural Networks\},
  journal = \{Advances in Neural Information Processing Systems\},
  year    = \{2017\},
  url     = \{https:\textcolor{comment}{//arxiv.org/abs/1706.02515\}}
\}
\end{DoxyCode}



\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 50 of file alpha\+\_\+dropout.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_ad6541c5c189746d32b9067d26b9409c5}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Alpha\+Dropout@{Alpha\+Dropout}}
\index{Alpha\+Dropout@{Alpha\+Dropout}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{Alpha\+Dropout()}
{\footnotesize\ttfamily \textbf{ Alpha\+Dropout} (\begin{DoxyParamCaption}\item[{const double}]{ratio = {\ttfamily 0.5},  }\item[{const double}]{alpha\+Dash = {\ttfamily -\/alpha~$\ast$lambda} }\end{DoxyParamCaption})}



Create the Alpha\+\_\+\+Dropout object using the specified ratio. 


\begin{DoxyParams}{Parameters}
{\em ratio} & The probability of setting a value to alpha\+Dash. \\
\hline
{\em alpha\+Dash} & The dropout scaling parameter. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_aab6c632054fc383ec1edf83231163bf7}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!A@{A}}
\index{A@{A}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{A()}
{\footnotesize\ttfamily double A (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Value to be multiplied with x for affine transformation. 



Definition at line 102 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_a32c95c63853c50d490c6ce28c8032630}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Alpha\+Dash@{Alpha\+Dash}}
\index{Alpha\+Dash@{Alpha\+Dash}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{Alpha\+Dash()}
{\footnotesize\ttfamily double Alpha\+Dash (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Value of alpha\+Dash. 



Definition at line 108 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_ab6ee6f0f970c90d4a148a64c074f09f5}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!B@{B}}
\index{B@{B}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{B()}
{\footnotesize\ttfamily double B (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Value to be added to a$\ast$x for affine transformation. 



Definition at line 105 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_ad9ad1a3bdb0f3fff5c839ed155e4bbf8}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Backward@{Backward}}
\index{Backward@{Backward}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\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 the alpha\+\_\+dropout layer. 


\begin{DoxyParams}{Parameters}
{\em 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_1AlphaDropout_a797f7edb44dd081e5e2b3cc316eef6bd}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Delta@{Delta}}
\index{Delta@{Delta}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\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 detla. 



Definition at line 89 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_ad6601342d560219ce951d554e69e5e87}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Delta@{Delta}}
\index{Delta@{Delta}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\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 91 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_a9f4103707f4d199ce5594d239b60443e}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Deterministic@{Deterministic}}
\index{Deterministic@{Deterministic}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{Deterministic()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool Deterministic (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



The value of the deterministic parameter. 



Definition at line 94 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_a42d4ee3da432cff20d3a41b8b1ec801c}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Deterministic@{Deterministic}}
\index{Deterministic@{Deterministic}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{Deterministic()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily bool\& Deterministic (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the value of the deterministic parameter. 



Definition at line 96 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_a461f849bc638c15bec262dc9c3a58abe}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Forward@{Forward}}
\index{Forward@{Forward}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\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 the alpha\+\_\+dropout layer. 


\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_1AlphaDropout_a6503ae5d92f15edf34212579382fca27}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Mask@{Mask}}
\index{Mask@{Mask}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{Mask()}
{\footnotesize\ttfamily Output\+Data\+Type const\& Mask (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the mask. 



Definition at line 111 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_a0ee21c2a36e5abad1e7a9d5dd00849f9}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Output\+Parameter@{Output\+Parameter}}
\index{Output\+Parameter@{Output\+Parameter}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\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 84 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_a21d5f745f02c709625a4ee0907f004a5}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Output\+Parameter@{Output\+Parameter}}
\index{Output\+Parameter@{Output\+Parameter}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\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 86 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_a0052f2d1427761ea25fb01a05d966a40}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Ratio@{Ratio}}
\index{Ratio@{Ratio}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{Ratio()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Ratio (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



The probability of setting a value to alpha\+Dash. 



Definition at line 99 of file alpha\+\_\+dropout.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1AlphaDropout_a9ca65c8f62aa7b45b5b08899d83d2821}} 
\index{mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}!Ratio@{Ratio}}
\index{Ratio@{Ratio}!mlpack\+::ann\+::\+Alpha\+Dropout@{mlpack\+::ann\+::\+Alpha\+Dropout}}
\subsubsection{Ratio()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Ratio (\begin{DoxyParamCaption}\item[{const double}]{r }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the probability of setting a value to alpha\+Dash. 

As \textquotesingle{}a\textquotesingle{} and \textquotesingle{}b\textquotesingle{} depend on \textquotesingle{}ratio\textquotesingle{}, modify them as well. 

Definition at line 115 of file alpha\+\_\+dropout.\+hpp.



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

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



Serialize the layer. 



Referenced by Alpha\+Dropout$<$ Input\+Data\+Type, Output\+Data\+Type $>$\+::\+Ratio().



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