class_network.tex 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. \hypertarget{class_network}{}\doxysection{Network Class Reference}
  2. \label{class_network}\index{Network@{Network}}
  3. {\ttfamily \#include $<$network.\+hpp$>$}
  4. \doxysubsection*{Public Member Functions}
  5. \begin{DoxyCompactItemize}
  6. \item
  7. void \mbox{\hyperlink{class_network_a7256dd4fca14fcf9373591ea1a1b42d6}{compute\+\_\+last\+\_\+delta}} (\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} y)
  8. \item
  9. \mbox{\hyperlink{class_network_a3cc2fb4f8fa4d507077e8da85ce5a1c8}{Network}} ()
  10. \item
  11. void \mbox{\hyperlink{class_network_a790c6368ae5d69fbdb550ed7306543e5}{set\+\_\+cost}} (\mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3}{Cost\+Function}})
  12. \item
  13. void \mbox{\hyperlink{class_network_ade63dfedd3ffa5c0b9ef3e03aa58bc11}{push\+\_\+layer}} (\mbox{\hyperlink{class_layer_1_1_layer}{Layer\+::\+Layer}} \&l)
  14. \item
  15. void \mbox{\hyperlink{class_network_a33b17ec8563577be73c109bfbb267c52}{is\+\_\+done}} ()
  16. \item
  17. \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_network_ab4a53f3e2d5c1033e9b2314826acf821}{feed\+\_\+forward}} (\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} x\+\_\+in)
  18. \item
  19. \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} \mbox{\hyperlink{class_network_a08f9864a68e23b74c1c212c67ca70ed4}{eval}} (\mbox{\hyperlink{class_dataset}{Dataset}} $\ast$dataset)
  20. \item
  21. void \mbox{\hyperlink{class_network_a7bfcf0b5c1ed41fc14771d256789a042}{train}} (\mbox{\hyperlink{class_dataset}{Dataset}} $\ast$dataset, size\+\_\+t nb\+\_\+epochs, size\+\_\+t batch\+\_\+size, \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} eta)
  22. \end{DoxyCompactItemize}
  23. \doxysubsection*{Public Attributes}
  24. \begin{DoxyCompactItemize}
  25. \item
  26. list$<$ \mbox{\hyperlink{class_layer_1_1_layer}{Layer\+::\+Layer}} $\ast$ $>$ \mbox{\hyperlink{class_network_a4bb79b836cfd07172c7ed37dade8cefd}{layers}}
  27. \item
  28. size\+\_\+t \mbox{\hyperlink{class_network_a912e19f5f19a486459cb8dac0bba7b7e}{n\+\_\+in}}
  29. \item
  30. size\+\_\+t \mbox{\hyperlink{class_network_a4b6a975d8042d27ac5a7a026db5fc1f0}{n\+\_\+out}}
  31. \item
  32. \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_network_ad71ea0a71fa28c4510e42fb809846404}{a}}
  33. \item
  34. \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_network_a7d23ea49f6f1c5c0524210f658390cbc}{last\+\_\+delta}}
  35. \item
  36. \mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3}{Cost\+Function}} \mbox{\hyperlink{class_network_abf80a2387544fb826f11ab922b857d50}{C}}
  37. \end{DoxyCompactItemize}
  38. \doxysubsection*{Protected Member Functions}
  39. \begin{DoxyCompactItemize}
  40. \item
  41. void \mbox{\hyperlink{class_network_aa515f8e09f5d2c989abdf68d97e79e26}{shuffle}} (size\+\_\+t $\ast$tab, size\+\_\+t size)
  42. \item
  43. void \mbox{\hyperlink{class_network_a2bb9069ed59682d142860215ed970e06}{update\+\_\+batch}} (\mbox{\hyperlink{class_dataset}{Dataset}} $\ast$dataset, size\+\_\+t $\ast$indices, size\+\_\+t begin, size\+\_\+t end, \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} eta)
  44. \item
  45. 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)
  46. \end{DoxyCompactItemize}
  47. \doxysubsection{Constructor \& Destructor Documentation}
  48. \mbox{\Hypertarget{class_network_a3cc2fb4f8fa4d507077e8da85ce5a1c8}\label{class_network_a3cc2fb4f8fa4d507077e8da85ce5a1c8}}
  49. \index{Network@{Network}!Network@{Network}}
  50. \index{Network@{Network}!Network@{Network}}
  51. \doxysubsubsection{\texorpdfstring{Network()}{Network()}}
  52. {\footnotesize\ttfamily Network\+::\+Network (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
  53. \doxysubsection{Member Function Documentation}
  54. \mbox{\Hypertarget{class_network_a6c324cab761fdff1c614305a6544a311}\label{class_network_a6c324cab761fdff1c614305a6544a311}}
  55. \index{Network@{Network}!back\_propagation@{back\_propagation}}
  56. \index{back\_propagation@{back\_propagation}!Network@{Network}}
  57. \doxysubsubsection{\texorpdfstring{back\_propagation()}{back\_propagation()}}
  58. {\footnotesize\ttfamily void Network\+::back\+\_\+propagation (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}}}]{x, }\item[{\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}}}]{y, }\item[{\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}}}]{eta }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}
  59. \mbox{\Hypertarget{class_network_a7256dd4fca14fcf9373591ea1a1b42d6}\label{class_network_a7256dd4fca14fcf9373591ea1a1b42d6}}
  60. \index{Network@{Network}!compute\_last\_delta@{compute\_last\_delta}}
  61. \index{compute\_last\_delta@{compute\_last\_delta}!Network@{Network}}
  62. \doxysubsubsection{\texorpdfstring{compute\_last\_delta()}{compute\_last\_delta()}}
  63. {\footnotesize\ttfamily void Network\+::compute\+\_\+last\+\_\+delta (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}}}]{y }\end{DoxyParamCaption})}
  64. \mbox{\Hypertarget{class_network_a08f9864a68e23b74c1c212c67ca70ed4}\label{class_network_a08f9864a68e23b74c1c212c67ca70ed4}}
  65. \index{Network@{Network}!eval@{eval}}
  66. \index{eval@{eval}!Network@{Network}}
  67. \doxysubsubsection{\texorpdfstring{eval()}{eval()}}
  68. {\footnotesize\ttfamily \mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} Network\+::eval (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_dataset}{Dataset}} $\ast$}]{dataset }\end{DoxyParamCaption})}
  69. \mbox{\Hypertarget{class_network_ab4a53f3e2d5c1033e9b2314826acf821}\label{class_network_ab4a53f3e2d5c1033e9b2314826acf821}}
  70. \index{Network@{Network}!feed\_forward@{feed\_forward}}
  71. \index{feed\_forward@{feed\_forward}!Network@{Network}}
  72. \doxysubsubsection{\texorpdfstring{feed\_forward()}{feed\_forward()}}
  73. {\footnotesize\ttfamily \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Network\+::feed\+\_\+forward (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}}}]{x\+\_\+in }\end{DoxyParamCaption})}
  74. \mbox{\Hypertarget{class_network_a33b17ec8563577be73c109bfbb267c52}\label{class_network_a33b17ec8563577be73c109bfbb267c52}}
  75. \index{Network@{Network}!is\_done@{is\_done}}
  76. \index{is\_done@{is\_done}!Network@{Network}}
  77. \doxysubsubsection{\texorpdfstring{is\_done()}{is\_done()}}
  78. {\footnotesize\ttfamily void Network\+::is\+\_\+done (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
  79. \mbox{\Hypertarget{class_network_ade63dfedd3ffa5c0b9ef3e03aa58bc11}\label{class_network_ade63dfedd3ffa5c0b9ef3e03aa58bc11}}
  80. \index{Network@{Network}!push\_layer@{push\_layer}}
  81. \index{push\_layer@{push\_layer}!Network@{Network}}
  82. \doxysubsubsection{\texorpdfstring{push\_layer()}{push\_layer()}}
  83. {\footnotesize\ttfamily void Network\+::push\+\_\+layer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_layer_1_1_layer}{Layer\+::\+Layer}} \&}]{l }\end{DoxyParamCaption})}
  84. \mbox{\Hypertarget{class_network_a790c6368ae5d69fbdb550ed7306543e5}\label{class_network_a790c6368ae5d69fbdb550ed7306543e5}}
  85. \index{Network@{Network}!set\_cost@{set\_cost}}
  86. \index{set\_cost@{set\_cost}!Network@{Network}}
  87. \doxysubsubsection{\texorpdfstring{set\_cost()}{set\_cost()}}
  88. {\footnotesize\ttfamily void Network\+::set\+\_\+cost (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3}{Cost\+Function}}}]{C\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}
  89. \mbox{\Hypertarget{class_network_aa515f8e09f5d2c989abdf68d97e79e26}\label{class_network_aa515f8e09f5d2c989abdf68d97e79e26}}
  90. \index{Network@{Network}!shuffle@{shuffle}}
  91. \index{shuffle@{shuffle}!Network@{Network}}
  92. \doxysubsubsection{\texorpdfstring{shuffle()}{shuffle()}}
  93. {\footnotesize\ttfamily void Network\+::shuffle (\begin{DoxyParamCaption}\item[{size\+\_\+t $\ast$}]{tab, }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}
  94. \mbox{\Hypertarget{class_network_a7bfcf0b5c1ed41fc14771d256789a042}\label{class_network_a7bfcf0b5c1ed41fc14771d256789a042}}
  95. \index{Network@{Network}!train@{train}}
  96. \index{train@{train}!Network@{Network}}
  97. \doxysubsubsection{\texorpdfstring{train()}{train()}}
  98. {\footnotesize\ttfamily void Network\+::train (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_dataset}{Dataset}} $\ast$}]{dataset, }\item[{size\+\_\+t}]{nb\+\_\+epochs, }\item[{size\+\_\+t}]{batch\+\_\+size, }\item[{\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}}}]{eta }\end{DoxyParamCaption})}
  99. \mbox{\Hypertarget{class_network_a2bb9069ed59682d142860215ed970e06}\label{class_network_a2bb9069ed59682d142860215ed970e06}}
  100. \index{Network@{Network}!update\_batch@{update\_batch}}
  101. \index{update\_batch@{update\_batch}!Network@{Network}}
  102. \doxysubsubsection{\texorpdfstring{update\_batch()}{update\_batch()}}
  103. {\footnotesize\ttfamily void Network\+::update\+\_\+batch (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_dataset}{Dataset}} $\ast$}]{dataset, }\item[{size\+\_\+t $\ast$}]{indices, }\item[{size\+\_\+t}]{begin, }\item[{size\+\_\+t}]{end, }\item[{\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}}}]{eta }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}
  104. \doxysubsection{Member Data Documentation}
  105. \mbox{\Hypertarget{class_network_ad71ea0a71fa28c4510e42fb809846404}\label{class_network_ad71ea0a71fa28c4510e42fb809846404}}
  106. \index{Network@{Network}!a@{a}}
  107. \index{a@{a}!Network@{Network}}
  108. \doxysubsubsection{\texorpdfstring{a}{a}}
  109. {\footnotesize\ttfamily \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Network\+::a}
  110. \mbox{\Hypertarget{class_network_abf80a2387544fb826f11ab922b857d50}\label{class_network_abf80a2387544fb826f11ab922b857d50}}
  111. \index{Network@{Network}!C@{C}}
  112. \index{C@{C}!Network@{Network}}
  113. \doxysubsubsection{\texorpdfstring{C}{C}}
  114. {\footnotesize\ttfamily \mbox{\hyperlink{network_8hpp_a0c3a80fe878325a4a277470fdc7b3eb3}{Cost\+Function}} Network\+::C}
  115. \mbox{\Hypertarget{class_network_a7d23ea49f6f1c5c0524210f658390cbc}\label{class_network_a7d23ea49f6f1c5c0524210f658390cbc}}
  116. \index{Network@{Network}!last\_delta@{last\_delta}}
  117. \index{last\_delta@{last\_delta}!Network@{Network}}
  118. \doxysubsubsection{\texorpdfstring{last\_delta}{last\_delta}}
  119. {\footnotesize\ttfamily \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} Network\+::last\+\_\+delta}
  120. \mbox{\Hypertarget{class_network_a4bb79b836cfd07172c7ed37dade8cefd}\label{class_network_a4bb79b836cfd07172c7ed37dade8cefd}}
  121. \index{Network@{Network}!layers@{layers}}
  122. \index{layers@{layers}!Network@{Network}}
  123. \doxysubsubsection{\texorpdfstring{layers}{layers}}
  124. {\footnotesize\ttfamily list$<$\mbox{\hyperlink{class_layer_1_1_layer}{Layer\+::\+Layer}}$\ast$$>$ Network\+::layers}
  125. \mbox{\Hypertarget{class_network_a912e19f5f19a486459cb8dac0bba7b7e}\label{class_network_a912e19f5f19a486459cb8dac0bba7b7e}}
  126. \index{Network@{Network}!n\_in@{n\_in}}
  127. \index{n\_in@{n\_in}!Network@{Network}}
  128. \doxysubsubsection{\texorpdfstring{n\_in}{n\_in}}
  129. {\footnotesize\ttfamily size\+\_\+t Network\+::n\+\_\+in}
  130. \mbox{\Hypertarget{class_network_a4b6a975d8042d27ac5a7a026db5fc1f0}\label{class_network_a4b6a975d8042d27ac5a7a026db5fc1f0}}
  131. \index{Network@{Network}!n\_out@{n\_out}}
  132. \index{n\_out@{n\_out}!Network@{Network}}
  133. \doxysubsubsection{\texorpdfstring{n\_out}{n\_out}}
  134. {\footnotesize\ttfamily size\+\_\+t Network\+::n\+\_\+out}
  135. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  136. \item
  137. src/\mbox{\hyperlink{network_8hpp}{network.\+hpp}}\item
  138. src/\mbox{\hyperlink{network_8cpp}{network.\+cpp}}\end{DoxyCompactItemize}