\section{/var/www/mlpack.ratml.\+org/mlpack.org/\+\_\+src/mlpack-\/3.3.2/src/mlpack/tests/ann\+\_\+test\+\_\+tools.hpp File Reference}
\label{ann__test__tools_8hpp}\index{/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+2/src/mlpack/tests/ann\+\_\+test\+\_\+tools.\+hpp@{/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+2/src/mlpack/tests/ann\+\_\+test\+\_\+tools.\+hpp}}
Include dependency graph for ann\+\_\+test\+\_\+tools.\+hpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{ann__test__tools_8hpp__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$class Function\+Type $>$ }\\double \textbf{ Check\+Gradient} (Function\+Type \&function, const double eps=1e-\/7)
\item 
{\footnotesize template$<$class Function\+Type $>$ }\\double \textbf{ Check\+Regularizer\+Gradient} (Function\+Type \&function, const double eps=1e-\/7)
\item 
{\footnotesize template$<$typename Module\+Type $>$ }\\double \textbf{ Jacobian\+Performance\+Test} (Module\+Type \&module, arma\+::mat \&input, arma\+::mat \&target, const double eps=1e-\/6)
\item 
{\footnotesize template$<$typename Module\+Type $>$ }\\double \textbf{ Jacobian\+Test} (Module\+Type \&module, arma\+::mat \&input, const double min\+Value=-\/2, const double max\+Value=-\/1, const double perturbation=1e-\/6)
\item 
{\footnotesize template$<$class T $>$ }\\void \textbf{ Reset\+Function} (T \&layer, typename std\+::enable\+\_\+if$<$ Has\+Reset\+Check$<$ T, void(T\+::$\ast$)()$>$\+::value $>$\+::type $\ast$=0)
\item 
{\footnotesize template$<$class T $>$ }\\void \textbf{ Reset\+Function} (T \&, typename std\+::enable\+\_\+if$<$!Has\+Reset\+Check$<$ T, void(T\+::$\ast$)()$>$\+::value $>$\+::type $\ast$=0)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Marcus Edel
\end{DoxyAuthor}
This file includes some useful functions for ann tests.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-\/clause B\+SD license. You should have received a copy of the 3-\/clause B\+SD license along with mlpack. If not, see {\tt http\+://www.\+opensource.\+org/licenses/\+B\+S\+D-\/3-\/\+Clause} for more information. 

\subsection{Function Documentation}
\mbox{\label{ann__test__tools_8hpp_ac9a7683ed87dc1de9e61256d5789890e}} 
\index{ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}!Check\+Gradient@{Check\+Gradient}}
\index{Check\+Gradient@{Check\+Gradient}!ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}}
\subsubsection{Check\+Gradient()}
{\footnotesize\ttfamily double Check\+Gradient (\begin{DoxyParamCaption}\item[{Function\+Type \&}]{function,  }\item[{const double}]{eps = {\ttfamily 1e-\/7} }\end{DoxyParamCaption})}



Definition at line 137 of file ann\+\_\+test\+\_\+tools.\+hpp.

\mbox{\label{ann__test__tools_8hpp_aa2e1d55cd23ecfcf17f1e450f04f8101}} 
\index{ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}!Check\+Regularizer\+Gradient@{Check\+Regularizer\+Gradient}}
\index{Check\+Regularizer\+Gradient@{Check\+Regularizer\+Gradient}!ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}}
\subsubsection{Check\+Regularizer\+Gradient()}
{\footnotesize\ttfamily double Check\+Regularizer\+Gradient (\begin{DoxyParamCaption}\item[{Function\+Type \&}]{function,  }\item[{const double}]{eps = {\ttfamily 1e-\/7} }\end{DoxyParamCaption})}



Definition at line 172 of file ann\+\_\+test\+\_\+tools.\+hpp.

\mbox{\label{ann__test__tools_8hpp_a07d364fc0ab9e484ce9b46ac2732ca42}} 
\index{ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}!Jacobian\+Performance\+Test@{Jacobian\+Performance\+Test}}
\index{Jacobian\+Performance\+Test@{Jacobian\+Performance\+Test}!ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}}
\subsubsection{Jacobian\+Performance\+Test()}
{\footnotesize\ttfamily double Jacobian\+Performance\+Test (\begin{DoxyParamCaption}\item[{Module\+Type \&}]{module,  }\item[{arma\+::mat \&}]{input,  }\item[{arma\+::mat \&}]{target,  }\item[{const double}]{eps = {\ttfamily 1e-\/6} }\end{DoxyParamCaption})}



Definition at line 104 of file ann\+\_\+test\+\_\+tools.\+hpp.

\mbox{\label{ann__test__tools_8hpp_a6c1852980c9a5957091df64a2e33016c}} 
\index{ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}!Jacobian\+Test@{Jacobian\+Test}}
\index{Jacobian\+Test@{Jacobian\+Test}!ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}}
\subsubsection{Jacobian\+Test()}
{\footnotesize\ttfamily double Jacobian\+Test (\begin{DoxyParamCaption}\item[{Module\+Type \&}]{module,  }\item[{arma\+::mat \&}]{input,  }\item[{const double}]{min\+Value = {\ttfamily -\/2},  }\item[{const double}]{max\+Value = {\ttfamily -\/1},  }\item[{const double}]{perturbation = {\ttfamily 1e-\/6} }\end{DoxyParamCaption})}



Definition at line 40 of file ann\+\_\+test\+\_\+tools.\+hpp.



References Random\+Initialization\+::\+Initialize(), and Reset\+Function().

\mbox{\label{ann__test__tools_8hpp_a78777fe2acf29b2cda6cf91dd1d03131}} 
\index{ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}!Reset\+Function@{Reset\+Function}}
\index{Reset\+Function@{Reset\+Function}!ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}}
\subsubsection{Reset\+Function()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Reset\+Function (\begin{DoxyParamCaption}\item[{T \&}]{layer,  }\item[{typename std\+::enable\+\_\+if$<$ Has\+Reset\+Check$<$ T, void(T\+::$\ast$)()$>$\+::value $>$\+::type $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption})}



Definition at line 22 of file ann\+\_\+test\+\_\+tools.\+hpp.



Referenced by Jacobian\+Test().

\mbox{\label{ann__test__tools_8hpp_a7f908c6765e1fbb5640310539b265b97}} 
\index{ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}!Reset\+Function@{Reset\+Function}}
\index{Reset\+Function@{Reset\+Function}!ann\+\_\+test\+\_\+tools.\+hpp@{ann\+\_\+test\+\_\+tools.\+hpp}}
\subsubsection{Reset\+Function()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Reset\+Function (\begin{DoxyParamCaption}\item[{T \&}]{,  }\item[{typename std\+::enable\+\_\+if$<$!Has\+Reset\+Check$<$ T, void(T\+::$\ast$)()$>$\+::value $>$\+::type $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption})}



Definition at line 30 of file ann\+\_\+test\+\_\+tools.\+hpp.

