\hypertarget{class_layer_1_1_layer}{}\doxysection{Layer\+::Layer Class Reference}
\label{class_layer_1_1_layer}\index{Layer::Layer@{Layer::Layer}}


{\ttfamily \#include $<$layer.\+hpp$>$}



Inheritance diagram for Layer\+::Layer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=348pt]{class_layer_1_1_layer__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_layer_1_1_layer_ac4ff1e869c508087bcf998899908be1a}{Layer}} (size\+\_\+t \mbox{\hyperlink{class_layer_1_1_layer_a99d315d8bcc460de6feba4bdac77766c}{n}}, size\+\_\+t \mbox{\hyperlink{class_layer_1_1_layer_a8d294cb3fc3d2970a2895ad8298d2e4d}{m}})
\item 
\mbox{\hyperlink{class_layer_1_1_layer_a032af2375e6bae4de0f7649b31a62318}{$\sim$\+Layer}} ()
\item 
size\+\_\+t \mbox{\hyperlink{class_layer_1_1_layer_a8db0801eb0439cd0a0004f3787d512f3}{get\+\_\+input\+\_\+size}} () const
\item 
size\+\_\+t \mbox{\hyperlink{class_layer_1_1_layer_afe6a48cc987b246fc470082ffe58d932}{get\+\_\+output\+\_\+size}} () const
\item 
\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_a5c9d2349c49234c1d29cdacd046788fa}{get\+\_\+output}} () const
\item 
virtual \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_aeb5b92a01bc4e867d347bff4767e919f}{feed\+\_\+forward}} (\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_af2ebcf019bc0e4b97f41fc9205706665}{x}})=0
\item 
virtual void \mbox{\hyperlink{class_layer_1_1_layer_a87dbd5d1c1091769ba285084bd3513e7}{init\+\_\+nabla}} ()=0
\item 
virtual \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_ad9e2853fce56b014b1e9de5097e21dbd}{back\+\_\+propagation}} (\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} e)=0
\item 
virtual void \mbox{\hyperlink{class_layer_1_1_layer_a8f0801b946b94dfe856c57a632c9998f}{update}} (\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} eta)=0
\end{DoxyCompactItemize}
\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
string \mbox{\hyperlink{class_layer_1_1_layer_a4c1dfb78f590b010a7a1e11706eb12f5}{name}}
\item 
size\+\_\+t \mbox{\hyperlink{class_layer_1_1_layer_a99d315d8bcc460de6feba4bdac77766c}{n}}
\item 
size\+\_\+t \mbox{\hyperlink{class_layer_1_1_layer_a8d294cb3fc3d2970a2895ad8298d2e4d}{m}}
\item 
\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_af2ebcf019bc0e4b97f41fc9205706665}{x}}
\item 
\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_acf6e43bdf3345739e8a2828a8c0606e7}{y}}
\item 
\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_affe7f5de8693b4af67765a9286686d82}{d}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
An abstract class representing a layer of a deep network. Such a layer can be seen as a map \[ \begin{array}{rcl} f:\mathbb{R}^n&\mapsto&\mathbb{R}^m\\ x&\to&y \end{array} \]. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_layer_1_1_layer_ac4ff1e869c508087bcf998899908be1a}\label{class_layer_1_1_layer_ac4ff1e869c508087bcf998899908be1a}} 
\index{Layer::Layer@{Layer::Layer}!Layer@{Layer}}
\index{Layer@{Layer}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{Layer()}{Layer()}}
{\footnotesize\ttfamily Layer\+::\+Layer\+::\+Layer (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{n,  }\item[{size\+\_\+t}]{m }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_layer_1_1_layer_a032af2375e6bae4de0f7649b31a62318}\label{class_layer_1_1_layer_a032af2375e6bae4de0f7649b31a62318}} 
\index{Layer::Layer@{Layer::Layer}!````~Layer@{$\sim$Layer}}
\index{````~Layer@{$\sim$Layer}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{$\sim$Layer()}{~Layer()}}
{\footnotesize\ttfamily Layer\+::\+Layer\+::$\sim$\+Layer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_layer_1_1_layer_ad9e2853fce56b014b1e9de5097e21dbd}\label{class_layer_1_1_layer_ad9e2853fce56b014b1e9de5097e21dbd}} 
\index{Layer::Layer@{Layer::Layer}!back\_propagation@{back\_propagation}}
\index{back\_propagation@{back\_propagation}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{back\_propagation()}{back\_propagation()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Layer\+::\+Layer\+::back\+\_\+propagation (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}}}]{e }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Apply back propagation algorithm on the delta output vector d. Used the input vector stored in x\+\_\+in\+\_\+ref during feedforward. Return a reference to the computed (and stored) input delta vector. Nabla vectors must be computed here. 

Implemented in \mbox{\hyperlink{class_layer_1_1_activation_layer_aa946acde267d94523d12465ca8976ab9}{Layer\+::\+Activation\+Layer$<$ A $>$}}, \mbox{\hyperlink{class_layer_1_1_convolution_layer_a5ccdf83a1217d57678c8bedcecc43a2a}{Layer\+::\+Convolution\+Layer}}, \mbox{\hyperlink{class_layer_1_1_full_connected_layer_a60219f302828bdf5ae4206b9a346627f}{Layer\+::\+Full\+Connected\+Layer}}, and \mbox{\hyperlink{class_layer_1_1_pooling_a3dc9bb1a69d3d7c2f627da9d2b737ac2}{Layer\+::\+Pooling}}.

\mbox{\Hypertarget{class_layer_1_1_layer_aeb5b92a01bc4e867d347bff4767e919f}\label{class_layer_1_1_layer_aeb5b92a01bc4e867d347bff4767e919f}} 
\index{Layer::Layer@{Layer::Layer}!feed\_forward@{feed\_forward}}
\index{feed\_forward@{feed\_forward}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{feed\_forward()}{feed\_forward()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Layer\+::\+Layer\+::feed\+\_\+forward (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}}}]{x }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Apply the layer to the input vector {\ttfamily x}. Vectors {\ttfamily x\+\_\+in\+\_\+ref} and {\ttfamily x\+\_\+out} must be updated in consequence. Return a reference to x\+\_\+out. 

Implemented in \mbox{\hyperlink{class_layer_1_1_activation_layer_a9bc3eb83733b4ee5a4a3c5c50e794478}{Layer\+::\+Activation\+Layer$<$ A $>$}}, \mbox{\hyperlink{class_layer_1_1_convolution_layer_a8315ef1016d165f8986fb3d4c2b65276}{Layer\+::\+Convolution\+Layer}}, \mbox{\hyperlink{class_layer_1_1_full_connected_layer_aea3b894c5efa65676c877c48a66b65cd}{Layer\+::\+Full\+Connected\+Layer}}, and \mbox{\hyperlink{class_layer_1_1_pooling_a91e5d2cfd897d0f196de969909c92afc}{Layer\+::\+Pooling}}.

\mbox{\Hypertarget{class_layer_1_1_layer_a8db0801eb0439cd0a0004f3787d512f3}\label{class_layer_1_1_layer_a8db0801eb0439cd0a0004f3787d512f3}} 
\index{Layer::Layer@{Layer::Layer}!get\_input\_size@{get\_input\_size}}
\index{get\_input\_size@{get\_input\_size}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{get\_input\_size()}{get\_input\_size()}}
{\footnotesize\ttfamily size\+\_\+t Layer\+::\+Layer\+::get\+\_\+input\+\_\+size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

Return the input size. \mbox{\Hypertarget{class_layer_1_1_layer_a5c9d2349c49234c1d29cdacd046788fa}\label{class_layer_1_1_layer_a5c9d2349c49234c1d29cdacd046788fa}} 
\index{Layer::Layer@{Layer::Layer}!get\_output@{get\_output}}
\index{get\_output@{get\_output}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{get\_output()}{get\_output()}}
{\footnotesize\ttfamily \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Layer\+::\+Layer\+::get\+\_\+output (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

Return a reference to the computed output vector. \mbox{\Hypertarget{class_layer_1_1_layer_afe6a48cc987b246fc470082ffe58d932}\label{class_layer_1_1_layer_afe6a48cc987b246fc470082ffe58d932}} 
\index{Layer::Layer@{Layer::Layer}!get\_output\_size@{get\_output\_size}}
\index{get\_output\_size@{get\_output\_size}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{get\_output\_size()}{get\_output\_size()}}
{\footnotesize\ttfamily size\+\_\+t Layer\+::\+Layer\+::get\+\_\+output\+\_\+size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

Return the output size. \mbox{\Hypertarget{class_layer_1_1_layer_a87dbd5d1c1091769ba285084bd3513e7}\label{class_layer_1_1_layer_a87dbd5d1c1091769ba285084bd3513e7}} 
\index{Layer::Layer@{Layer::Layer}!init\_nabla@{init\_nabla}}
\index{init\_nabla@{init\_nabla}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{init\_nabla()}{init\_nabla()}}
{\footnotesize\ttfamily virtual void Layer\+::\+Layer\+::init\+\_\+nabla (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Initialize nabla vectors which are used during gradient descent. 

Implemented in \mbox{\hyperlink{class_layer_1_1_activation_layer_a230ad43fde65528cc36021e097f111a4}{Layer\+::\+Activation\+Layer$<$ A $>$}}, \mbox{\hyperlink{class_layer_1_1_convolution_layer_a435dfabf3e575ddf07a11304e2d4fe84}{Layer\+::\+Convolution\+Layer}}, \mbox{\hyperlink{class_layer_1_1_full_connected_layer_afd7c08ff8b30bbfc217159188ef483c5}{Layer\+::\+Full\+Connected\+Layer}}, and \mbox{\hyperlink{class_layer_1_1_pooling_a5c59ea7b198d3e42e334051f7a6e4645}{Layer\+::\+Pooling}}.

\mbox{\Hypertarget{class_layer_1_1_layer_a8f0801b946b94dfe856c57a632c9998f}\label{class_layer_1_1_layer_a8f0801b946b94dfe856c57a632c9998f}} 
\index{Layer::Layer@{Layer::Layer}!update@{update}}
\index{update@{update}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{update()}{update()}}
{\footnotesize\ttfamily virtual void Layer\+::\+Layer\+::update (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}}}]{eta }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Update layer parameters using gradient descent algorithm with learning rate eta. 

Implemented in \mbox{\hyperlink{class_layer_1_1_activation_layer_afbc9f12d792008bbaf6d6c2d0177ebf1}{Layer\+::\+Activation\+Layer$<$ A $>$}}, \mbox{\hyperlink{class_layer_1_1_convolution_layer_a4764f42dfc31ad2d848e0d1c22b0704b}{Layer\+::\+Convolution\+Layer}}, \mbox{\hyperlink{class_layer_1_1_full_connected_layer_ab07a441a9cfead787120daea7193bc63}{Layer\+::\+Full\+Connected\+Layer}}, and \mbox{\hyperlink{class_layer_1_1_pooling_ab04c4682d176b4bc760aee53c0ecc36a}{Layer\+::\+Pooling}}.



\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{class_layer_1_1_layer_affe7f5de8693b4af67765a9286686d82}\label{class_layer_1_1_layer_affe7f5de8693b4af67765a9286686d82}} 
\index{Layer::Layer@{Layer::Layer}!d@{d}}
\index{d@{d}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{d}{d}}
{\footnotesize\ttfamily \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Layer\+::\+Layer\+::d}

Computed input delta vector computed by back propagation algorithm. Owned by the layer. \mbox{\Hypertarget{class_layer_1_1_layer_a8d294cb3fc3d2970a2895ad8298d2e4d}\label{class_layer_1_1_layer_a8d294cb3fc3d2970a2895ad8298d2e4d}} 
\index{Layer::Layer@{Layer::Layer}!m@{m}}
\index{m@{m}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{m}{m}}
{\footnotesize\ttfamily size\+\_\+t Layer\+::\+Layer\+::m}

Size of the output vector. \mbox{\Hypertarget{class_layer_1_1_layer_a99d315d8bcc460de6feba4bdac77766c}\label{class_layer_1_1_layer_a99d315d8bcc460de6feba4bdac77766c}} 
\index{Layer::Layer@{Layer::Layer}!n@{n}}
\index{n@{n}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{n}{n}}
{\footnotesize\ttfamily size\+\_\+t Layer\+::\+Layer\+::n}

Size of the input vector. \mbox{\Hypertarget{class_layer_1_1_layer_a4c1dfb78f590b010a7a1e11706eb12f5}\label{class_layer_1_1_layer_a4c1dfb78f590b010a7a1e11706eb12f5}} 
\index{Layer::Layer@{Layer::Layer}!name@{name}}
\index{name@{name}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{name}{name}}
{\footnotesize\ttfamily string Layer\+::\+Layer\+::name}

The name of the layer. Used for debugging. \mbox{\Hypertarget{class_layer_1_1_layer_af2ebcf019bc0e4b97f41fc9205706665}\label{class_layer_1_1_layer_af2ebcf019bc0e4b97f41fc9205706665}} 
\index{Layer::Layer@{Layer::Layer}!x@{x}}
\index{x@{x}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{x}{x}}
{\footnotesize\ttfamily \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Layer\+::\+Layer\+::x}

A reference to the input vector. \mbox{\Hypertarget{class_layer_1_1_layer_acf6e43bdf3345739e8a2828a8c0606e7}\label{class_layer_1_1_layer_acf6e43bdf3345739e8a2828a8c0606e7}} 
\index{Layer::Layer@{Layer::Layer}!y@{y}}
\index{y@{y}!Layer::Layer@{Layer::Layer}}
\doxysubsubsection{\texorpdfstring{y}{y}}
{\footnotesize\ttfamily \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Layer\+::\+Layer\+::y}

Computed output vector. Owned by the layer. 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/layers/\mbox{\hyperlink{layer_8hpp}{layer.\+hpp}}\end{DoxyCompactItemize}
