\hypertarget{network_8hpp_source}{}\doxysection{network.\+hpp}
\label{network_8hpp_source}\index{src/network.hpp@{src/network.hpp}}
\mbox{\hyperlink{network_8hpp}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef NETWORK\_HPP}}
\DoxyCodeLine{2 \textcolor{preprocessor}{\#define NETWORK\_HPP}}
\DoxyCodeLine{3 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <random>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <list>}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{layer_8hpp}{layers/layer.hpp}}"{}}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{dataset_8hpp}{dataset.hpp}}"{}}}
\DoxyCodeLine{9 }
\DoxyCodeLine{10 \textcolor{keyword}{enum} \mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3}{CostFunction}}\{\mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3af206692cba38b2772a5172a6e70719e0}{CrossEntropy}},\mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3a47322e5ac1e111522d3aa88118ac78c0}{Quadratic}}\};}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{keyword}{class }\mbox{\hyperlink{class_network}{Network}}\{}
\DoxyCodeLine{13 \textcolor{keyword}{public}:}
\DoxyCodeLine{14   list<Layer::Layer*> \mbox{\hyperlink{class_network_a4bb79b836cfd07172c7ed37dade8cefd}{layers}};}
\DoxyCodeLine{15   \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_network_a912e19f5f19a486459cb8dac0bba7b7e}{n\_in}};}
\DoxyCodeLine{16   \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_network_a4b6a975d8042d27ac5a7a026db5fc1f0}{n\_out}};}
\DoxyCodeLine{17   \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_network_ad71ea0a71fa28c4510e42fb809846404}{a}};}
\DoxyCodeLine{18   \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_network_a7d23ea49f6f1c5c0524210f658390cbc}{last\_delta}};}
\DoxyCodeLine{19   \mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3}{CostFunction}} \mbox{\hyperlink{class_network_abf80a2387544fb826f11ab922b857d50}{C}};}
\DoxyCodeLine{20   \textcolor{keywordtype}{void} \mbox{\hyperlink{class_network_a7256dd4fca14fcf9373591ea1a1b42d6}{compute\_last\_delta}}(\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} y);}
\DoxyCodeLine{21 \textcolor{keyword}{protected}:}
\DoxyCodeLine{22   \textcolor{keywordtype}{void} \mbox{\hyperlink{class_network_aa515f8e09f5d2c989abdf68d97e79e26}{shuffle}}(\textcolor{keywordtype}{size\_t}* tab,\textcolor{keywordtype}{size\_t} size);}
\DoxyCodeLine{23   \textcolor{keywordtype}{void} \mbox{\hyperlink{class_network_a2bb9069ed59682d142860215ed970e06}{update\_batch}}(\mbox{\hyperlink{class_dataset}{Dataset}}* dataset,\textcolor{keywordtype}{size\_t}* indices,\textcolor{keywordtype}{size\_t} begin,\textcolor{keywordtype}{size\_t} end,\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} eta);}
\DoxyCodeLine{24   \textcolor{keywordtype}{void} \mbox{\hyperlink{class_network_a6c324cab761fdff1c614305a6544a311}{back\_propagation}}(\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} x,\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} y,\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} eta);}
\DoxyCodeLine{25 \textcolor{keyword}{public}:}
\DoxyCodeLine{26   \mbox{\hyperlink{class_network_a3cc2fb4f8fa4d507077e8da85ce5a1c8}{Network}}();}
\DoxyCodeLine{27   \textcolor{keywordtype}{void} \mbox{\hyperlink{class_network_a790c6368ae5d69fbdb550ed7306543e5}{set\_cost}}(\mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3}{CostFunction}});}
\DoxyCodeLine{28   \textcolor{keywordtype}{void} \mbox{\hyperlink{class_network_ade63dfedd3ffa5c0b9ef3e03aa58bc11}{push\_layer}}(\mbox{\hyperlink{class_layer_1_1_layer}{Layer::Layer}}\& l);}
\DoxyCodeLine{29   \textcolor{keywordtype}{void} \mbox{\hyperlink{class_network_a33b17ec8563577be73c109bfbb267c52}{is\_done}}();}
\DoxyCodeLine{30   \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_network_ab4a53f3e2d5c1033e9b2314826acf821}{feed\_forward}}(\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} x\_in);}
\DoxyCodeLine{31   \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} \mbox{\hyperlink{class_network_a08f9864a68e23b74c1c212c67ca70ed4}{eval}}(\mbox{\hyperlink{class_dataset}{Dataset}} *dataset);}
\DoxyCodeLine{32   \textcolor{keywordtype}{void} \mbox{\hyperlink{class_network_a7bfcf0b5c1ed41fc14771d256789a042}{train}}(\mbox{\hyperlink{class_dataset}{Dataset}}* dataset,\textcolor{keywordtype}{size\_t} nb\_epochs,\textcolor{keywordtype}{size\_t} batch\_size,\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} eta);}
\DoxyCodeLine{33 \};}
\DoxyCodeLine{34 }
\DoxyCodeLine{35 \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{36 \mbox{\hyperlink{class_network_a790c6368ae5d69fbdb550ed7306543e5}{Network::set\_cost}}(\mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3}{CostFunction}} C\_)\{}
\DoxyCodeLine{37   \mbox{\hyperlink{class_network_abf80a2387544fb826f11ab922b857d50}{C}}=C\_;}
\DoxyCodeLine{38 \}}
\DoxyCodeLine{39 \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
