\section{/var/www/mlpack.ratml.\+org/mlpack.org/\+\_\+src/mlpack-\/3.3.1/src/mlpack/methods/ann/layer/hardshrink.hpp File Reference}
\label{hardshrink_8hpp}\index{/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+1/src/mlpack/methods/ann/layer/hardshrink.\+hpp@{/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+1/src/mlpack/methods/ann/layer/hardshrink.\+hpp}}
Include dependency graph for hardshrink.\+hpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{hardshrink_8hpp__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{hardshrink_8hpp__dep__incl}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \textbf{ Hard\+Shrink$<$ Input\+Data\+Type, Output\+Data\+Type $>$}
\begin{DoxyCompactList}\small\item\em Hard Shrink operator is defined as, \begin{eqnarray*} f(x) &=& \left\{ \begin{array}{lr} x & : x > lambda \\ x & : x < -lambda \\ 0 & : otherwise \end{array} \\ \right. f'(x) &=& \left\{ \begin{array}{lr} 1 & : x > lambda \\ 1 & : x < -lambda \\ 0 & : otherwise \end{array} \right. \end{eqnarray*} lambda is set to 0.\+5 by default. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
 \textbf{ mlpack}
\begin{DoxyCompactList}\small\item\em strip\+\_\+type.\+hpp \end{DoxyCompactList}\item 
 \textbf{ mlpack\+::ann}
\begin{DoxyCompactList}\small\item\em Artificial Neural Network. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Lakshya Ojha
\end{DoxyAuthor}
Same as soft thresholding, if its amplitude is smaller than a predefined threshold, it will be set to zero (kill), otherwise it will be kept unchanged. In order to promote sparsity and to improve the approximation, the hard thresholding method is used as an alternative.

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. 