\section{Orthogonal\+Regularizer Class Reference}
\label{classmlpack_1_1ann_1_1OrthogonalRegularizer}\index{Orthogonal\+Regularizer@{Orthogonal\+Regularizer}}


Implementation of the \doxyref{Orthogonal\+Regularizer}{p.}{classmlpack_1_1ann_1_1OrthogonalRegularizer}.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Orthogonal\+Regularizer} (double \textbf{ factor}=1.\+0)
\begin{DoxyCompactList}\small\item\em Create the regularizer object. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\void \textbf{ Evaluate} (const Mat\+Type \&weight, Mat\+Type \&gradient)
\begin{DoxyCompactList}\small\item\em Calculate the gradient for regularization. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the regularizer (nothing to do). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
double \textbf{ factor}
\begin{DoxyCompactList}\small\item\em The constant for the regularization. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implementation of the \doxyref{Orthogonal\+Regularizer}{p.}{classmlpack_1_1ann_1_1OrthogonalRegularizer}. 

Orthogonality of weights is a desirable property because multiplication by an orthogonal matrix leaves the norm of the matrix unchanged. The orthogonal regularization technique encourages weights to be orthogonal.

For more information, see the following.


\begin{DoxyCode}
@inproceedings\{WanICML2013,
  title=\{Neural Photo Editing with Introspective Adversarial Networks\},
  booktitle = \{5th International Conference on Learning Representations
               (ICLR - 17)\},
  author = \{Andrew Brock and Theodore Lim and J.M. Ritchie and Nick Weston\},
  year = \{2017\}
\}
\end{DoxyCode}
 

Definition at line 38 of file orthogonal\+\_\+regularizer.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1ann_1_1OrthogonalRegularizer_a80b67146036ad77f6d4f044ef0b26095}} 
\index{mlpack\+::ann\+::\+Orthogonal\+Regularizer@{mlpack\+::ann\+::\+Orthogonal\+Regularizer}!Orthogonal\+Regularizer@{Orthogonal\+Regularizer}}
\index{Orthogonal\+Regularizer@{Orthogonal\+Regularizer}!mlpack\+::ann\+::\+Orthogonal\+Regularizer@{mlpack\+::ann\+::\+Orthogonal\+Regularizer}}
\subsubsection{Orthogonal\+Regularizer()}
{\footnotesize\ttfamily \textbf{ Orthogonal\+Regularizer} (\begin{DoxyParamCaption}\item[{double}]{factor = {\ttfamily 1.0} }\end{DoxyParamCaption})}



Create the regularizer object. 


\begin{DoxyParams}{Parameters}
{\em factor} & The factor for regularization. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1ann_1_1OrthogonalRegularizer_a77155b253292485b11241c0a4f04612a}} 
\index{mlpack\+::ann\+::\+Orthogonal\+Regularizer@{mlpack\+::ann\+::\+Orthogonal\+Regularizer}!Evaluate@{Evaluate}}
\index{Evaluate@{Evaluate}!mlpack\+::ann\+::\+Orthogonal\+Regularizer@{mlpack\+::ann\+::\+Orthogonal\+Regularizer}}
\subsubsection{Evaluate()}
{\footnotesize\ttfamily void Evaluate (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{weight,  }\item[{Mat\+Type \&}]{gradient }\end{DoxyParamCaption})}



Calculate the gradient for regularization. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Mat\+Type} & Type of weight matrix. \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em weight} & The weight matrix to be regularized. \\
\hline
{\em gradient} & The calculated gradient. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1ann_1_1OrthogonalRegularizer_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::ann\+::\+Orthogonal\+Regularizer@{mlpack\+::ann\+::\+Orthogonal\+Regularizer}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::ann\+::\+Orthogonal\+Regularizer@{mlpack\+::ann\+::\+Orthogonal\+Regularizer}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})}



Serialize the regularizer (nothing to do). 



\subsection{Member Data Documentation}
\mbox{\label{classmlpack_1_1ann_1_1OrthogonalRegularizer_a2d7e5dd7a479c4c7aef6e6133a1441c5}} 
\index{mlpack\+::ann\+::\+Orthogonal\+Regularizer@{mlpack\+::ann\+::\+Orthogonal\+Regularizer}!factor@{factor}}
\index{factor@{factor}!mlpack\+::ann\+::\+Orthogonal\+Regularizer@{mlpack\+::ann\+::\+Orthogonal\+Regularizer}}
\subsubsection{factor}
{\footnotesize\ttfamily double factor}



The constant for the regularization. 



Definition at line 63 of file orthogonal\+\_\+regularizer.\+hpp.



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.\+2/src/mlpack/methods/ann/regularizer/\textbf{ orthogonal\+\_\+regularizer.\+hpp}\end{DoxyCompactItemize}
