\hypertarget{layer_8hpp_source}{}\doxysection{layer.\+hpp}
\label{layer_8hpp_source}\index{src/layers/layer.hpp@{src/layers/layer.hpp}}
\mbox{\hyperlink{layer_8hpp}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef LAYER\_HPP}}
\DoxyCodeLine{2 \textcolor{preprocessor}{\#define LAYER\_HPP}}
\DoxyCodeLine{3 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{debug_8hpp}{debug.hpp}}"{}}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{vector_8hpp}{vector.hpp}}"{}}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{shape_8hpp}{shape.hpp}}"{}}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <cmath>}}
\DoxyCodeLine{8 }
\DoxyCodeLine{9 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespace_layer}{Layer}}\{}
\DoxyCodeLine{20   \textcolor{keyword}{class }\mbox{\hyperlink{namespace_layer}{Layer}}\{}
\DoxyCodeLine{21   \textcolor{keyword}{public}:}
\DoxyCodeLine{23     \textcolor{keywordtype}{string} \mbox{\hyperlink{class_layer_1_1_layer_a4c1dfb78f590b010a7a1e11706eb12f5}{name}};}
\DoxyCodeLine{24 }
\DoxyCodeLine{26     \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_layer_a99d315d8bcc460de6feba4bdac77766c}{n}};}
\DoxyCodeLine{27 }
\DoxyCodeLine{29     \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_layer_a8d294cb3fc3d2970a2895ad8298d2e4d}{m}};}
\DoxyCodeLine{30 }
\DoxyCodeLine{32     \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_af2ebcf019bc0e4b97f41fc9205706665}{x}};}
\DoxyCodeLine{33 }
\DoxyCodeLine{35     \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_acf6e43bdf3345739e8a2828a8c0606e7}{y}};}
\DoxyCodeLine{36 }
\DoxyCodeLine{38     \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_affe7f5de8693b4af67765a9286686d82}{d}};}
\DoxyCodeLine{39 }
\DoxyCodeLine{40     \mbox{\hyperlink{namespace_layer}{Layer}}(\textcolor{keywordtype}{size\_t} n,\textcolor{keywordtype}{size\_t} m);}
\DoxyCodeLine{41 }
\DoxyCodeLine{42     \mbox{\hyperlink{namespace_layer}{\string~Layer}}();}
\DoxyCodeLine{43 }
\DoxyCodeLine{45     \textcolor{keywordtype}{size\_t} get\_input\_size() \textcolor{keyword}{const};}
\DoxyCodeLine{46 }
\DoxyCodeLine{48     \textcolor{keywordtype}{size\_t} get\_output\_size() \textcolor{keyword}{const};}
\DoxyCodeLine{49 }
\DoxyCodeLine{51     \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} get\_output() \textcolor{keyword}{const};}
\DoxyCodeLine{52 }
\DoxyCodeLine{54     \textcolor{keyword}{virtual} \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_aeb5b92a01bc4e867d347bff4767e919f}{feed\_forward}}(\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} x)=0;}
\DoxyCodeLine{55 }
\DoxyCodeLine{57     \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} \mbox{\hyperlink{class_layer_1_1_layer_a87dbd5d1c1091769ba285084bd3513e7}{init\_nabla}}()=0;}
\DoxyCodeLine{58 }
\DoxyCodeLine{61     \textcolor{keyword}{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;}
\DoxyCodeLine{62 }
\DoxyCodeLine{64     \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} \mbox{\hyperlink{class_layer_1_1_layer_a8f0801b946b94dfe856c57a632c9998f}{update}}(\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} eta)=0;}
\DoxyCodeLine{65   \};}
\DoxyCodeLine{66 }
\DoxyCodeLine{67   \textcolor{keyword}{inline}}
\DoxyCodeLine{68   \mbox{\hyperlink{class_layer_1_1_layer}{Layer::Layer}}(\textcolor{keywordtype}{size\_t} n\_,\textcolor{keywordtype}{size\_t} m\_)\{}
\DoxyCodeLine{69     n=n\_;}
\DoxyCodeLine{70     m=m\_;}
\DoxyCodeLine{71     y=\mbox{\hyperlink{vector_8hpp_a624100980bbf31adef9cc6bfd6e89738}{init\_vector}}(m);}
\DoxyCodeLine{72     d=\mbox{\hyperlink{vector_8hpp_a624100980bbf31adef9cc6bfd6e89738}{init\_vector}}(n);}
\DoxyCodeLine{73   \}}
\DoxyCodeLine{74 }
\DoxyCodeLine{75   \textcolor{keyword}{inline}}
\DoxyCodeLine{76   Layer::\string~Layer()\{}
\DoxyCodeLine{77     \mbox{\hyperlink{vector_8hpp_a34a7c651953c188bf41e94dee669ad70}{delete\_vector}}(y);}
\DoxyCodeLine{78     \mbox{\hyperlink{vector_8hpp_a34a7c651953c188bf41e94dee669ad70}{delete\_vector}}(d);}
\DoxyCodeLine{79   \}}
\DoxyCodeLine{80 }
\DoxyCodeLine{81   \textcolor{keyword}{inline} \textcolor{keywordtype}{size\_t}}
\DoxyCodeLine{82   Layer::get\_input\_size()\textcolor{keyword}{ const}\{}
\DoxyCodeLine{83     \textcolor{keywordflow}{return} n;}
\DoxyCodeLine{84   \}}
\DoxyCodeLine{85 }
\DoxyCodeLine{86   \textcolor{keyword}{inline} \textcolor{keywordtype}{size\_t}}
\DoxyCodeLine{87   Layer::get\_output\_size()\textcolor{keyword}{ const}\{}
\DoxyCodeLine{88     \textcolor{keywordflow}{return} m;}
\DoxyCodeLine{89   \}}
\DoxyCodeLine{90 }
\DoxyCodeLine{91   \textcolor{keyword}{inline} \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}}}
\DoxyCodeLine{92   Layer::get\_output()\textcolor{keyword}{ const}\{}
\DoxyCodeLine{93     \textcolor{keywordflow}{return} y;}
\DoxyCodeLine{94   \}}
\DoxyCodeLine{95 \}}
\DoxyCodeLine{96 }
\DoxyCodeLine{97 \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
