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


The glimpse layer returns a retina-\/like representation (down-\/scaled cropped images) of increasing scale around a given location in a given image.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Glimpse} (const size\+\_\+t in\+Size=0, const size\+\_\+t size=0, const size\+\_\+t depth=3, const size\+\_\+t scale=2, const size\+\_\+t input\+Width=0, const size\+\_\+t input\+Height=0)
\begin{DoxyCompactList}\small\item\em Create the Glimpse\+Layer object using the specified ratio and rescale parameter. \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 glimpse layer. \end{DoxyCompactList}\item 
Output\+Data\+Type \& \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 Get 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 glimpse layer. \end{DoxyCompactList}\item 
size\+\_\+t const  \& \textbf{ Input\+Height} () const
\begin{DoxyCompactList}\small\item\em Get the input height. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Input\+Height} ()
\begin{DoxyCompactList}\small\item\em Modify the input height. \end{DoxyCompactList}\item 
size\+\_\+t const  \& \textbf{ Input\+Width} () const
\begin{DoxyCompactList}\small\item\em Get the input width. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Input\+Width} ()
\begin{DoxyCompactList}\small\item\em Modify input the width. \end{DoxyCompactList}\item 
void \textbf{ Location} (const arma\+::mat \&location)
\begin{DoxyCompactList}\small\item\em Set the locationthe x and y coordinate of the center of the output glimpse. \end{DoxyCompactList}\item 
size\+\_\+t const  \& \textbf{ Output\+Height} () const
\begin{DoxyCompactList}\small\item\em Get the output height. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Output\+Height} ()
\begin{DoxyCompactList}\small\item\em Modify the output height. \end{DoxyCompactList}\item 
Output\+Data\+Type \& \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 const  \& \textbf{ Output\+Width} () const
\begin{DoxyCompactList}\small\item\em Get the output width. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Output\+Width} ()
\begin{DoxyCompactList}\small\item\em Modify the output 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\+::\+Glimpse$<$ Input\+Data\+Type, Output\+Data\+Type $>$}

The glimpse layer returns a retina-\/like representation (down-\/scaled cropped images) of increasing scale around a given location in a given image. 


\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 88 of file glimpse.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a19c2ef07809ce53bd8eef72ed2c6e1eb}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Glimpse@{Glimpse}}
\index{Glimpse@{Glimpse}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Glimpse()}
{\footnotesize\ttfamily \textbf{ Glimpse} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{in\+Size = {\ttfamily 0},  }\item[{const size\+\_\+t}]{size = {\ttfamily 0},  }\item[{const size\+\_\+t}]{depth = {\ttfamily 3},  }\item[{const size\+\_\+t}]{scale = {\ttfamily 2},  }\item[{const size\+\_\+t}]{input\+Width = {\ttfamily 0},  }\item[{const size\+\_\+t}]{input\+Height = {\ttfamily 0} }\end{DoxyParamCaption})}



Create the Glimpse\+Layer object using the specified ratio and rescale parameter. 


\begin{DoxyParams}{Parameters}
{\em in\+Size} & The size of the input units. \\
\hline
{\em size} & The used glimpse size (height = width). \\
\hline
{\em depth} & The number of patches to crop per glimpse. \\
\hline
{\em scale} & The scaling factor used to create the increasing retina-\/like representation. \\
\hline
{\em input\+Width} & The input width of the given input data. \\
\hline
{\em input\+Height} & The input height of the given input data. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1ann_1_1Glimpse_ad9ad1a3bdb0f3fff5c839ed155e4bbf8}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Backward@{Backward}}
\index{Backward@{Backward}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\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 glimpse 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_1Glimpse_ae7c8eba5764f021cd93e30efe638e63c}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Delta@{Delta}}
\index{Delta@{Delta}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Delta()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Output\+Data\+Type\& Delta (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the detla. 



Definition at line 137 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_ad6601342d560219ce951d554e69e5e87}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Delta@{Delta}}
\index{Delta@{Delta}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\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 139 of file glimpse.\+hpp.

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



Get the value of the deterministic parameter. 



Definition at line 169 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a42d4ee3da432cff20d3a41b8b1ec801c}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Deterministic@{Deterministic}}
\index{Deterministic@{Deterministic}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\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 171 of file glimpse.\+hpp.



References Mean\+Pooling\+Rule\+::\+Pooling(), and Mean\+Pooling\+Rule\+::\+Unpooling().

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a461f849bc638c15bec262dc9c3a58abe}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Forward@{Forward}}
\index{Forward@{Forward}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\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 glimpse 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_1Glimpse_afb3fd4ed60dd057e7852221b89206f15}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Input\+Height@{Input\+Height}}
\index{Input\+Height@{Input\+Height}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Input\+Height()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t const\& Input\+Height (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the input height. 



Definition at line 154 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_aefbba724eec397a928d5460bb209a360}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Input\+Height@{Input\+Height}}
\index{Input\+Height@{Input\+Height}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Input\+Height()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Input\+Height (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the input height. 



Definition at line 156 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a29346e3064da8f9e5f10596bedae0ba8}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Input\+Width@{Input\+Width}}
\index{Input\+Width@{Input\+Width}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Input\+Width()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t const\& Input\+Width (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the input width. 



Definition at line 149 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a238e9d308df611a9300a4ca6756fef4d}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Input\+Width@{Input\+Width}}
\index{Input\+Width@{Input\+Width}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Input\+Width()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Input\+Width (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify input the width. 



Definition at line 151 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a8f32d484de0d3abca25a1aa77a7ab855}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Location@{Location}}
\index{Location@{Location}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Location()}
{\footnotesize\ttfamily void Location (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{location }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Set the locationthe x and y coordinate of the center of the output glimpse. 



Definition at line 143 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a5ad7dbcaf1a622dafd897f79ab77890c}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Output\+Height@{Output\+Height}}
\index{Output\+Height@{Output\+Height}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Output\+Height()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t const\& Output\+Height (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the output height. 



Definition at line 164 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_ac5112abf9f5e1face13ed965a8755b1d}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Output\+Height@{Output\+Height}}
\index{Output\+Height@{Output\+Height}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Output\+Height()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Output\+Height (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the output height. 



Definition at line 166 of file glimpse.\+hpp.

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



Get the output parameter. 



Definition at line 132 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a21d5f745f02c709625a4ee0907f004a5}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Output\+Parameter@{Output\+Parameter}}
\index{Output\+Parameter@{Output\+Parameter}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\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 134 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a32b3e3fe787456847fc3b2c39586ecb1}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Output\+Width@{Output\+Width}}
\index{Output\+Width@{Output\+Width}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Output\+Width()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t const\& Output\+Width (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the output width. 



Definition at line 159 of file glimpse.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1Glimpse_a54579ec9924e2a4a5bc0a4fb822ce80c}} 
\index{mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}!Output\+Width@{Output\+Width}}
\index{Output\+Width@{Output\+Width}!mlpack\+::ann\+::\+Glimpse@{mlpack\+::ann\+::\+Glimpse}}
\subsubsection{Output\+Width()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Output\+Width (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the output width. 



Definition at line 161 of file glimpse.\+hpp.

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



Serialize the layer. 



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.\+0/src/mlpack/methods/ann/layer/\textbf{ glimpse.\+hpp}\end{DoxyCompactItemize}
