convolution_8hpp_source.tex 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. \hypertarget{convolution_8hpp_source}{}\doxysection{convolution.\+hpp}
  2. \label{convolution_8hpp_source}\index{src/layers/convolution.hpp@{src/layers/convolution.hpp}}
  3. \mbox{\hyperlink{convolution_8hpp}{Go to the documentation of this file.}}
  4. \begin{DoxyCode}{0}
  5. \DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef CONVOLUTION\_LAYER\_HPP}}
  6. \DoxyCodeLine{2 \textcolor{preprocessor}{\#define CONVOLUTION\_LAYER\_HPP}}
  7. \DoxyCodeLine{3 }
  8. \DoxyCodeLine{4 \textcolor{preprocessor}{\#include <random>}}
  9. \DoxyCodeLine{5 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{layer_8hpp}{layer.hpp}}"{}}}
  10. \DoxyCodeLine{6 }
  11. \DoxyCodeLine{7 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespace_layer}{Layer}}\{}
  12. \DoxyCodeLine{8 \textcolor{comment}{ /*****************************************}}
  13. \DoxyCodeLine{9 \textcolor{comment}{ * Implementation of a convolutionnal Layer}}
  14. \DoxyCodeLine{10 \textcolor{comment}{}}
  15. \DoxyCodeLine{11 \textcolor{comment}{ */}}
  16. \DoxyCodeLine{12 \textcolor{keyword}{class }\mbox{\hyperlink{class_layer_1_1_convolution_layer}{ConvolutionLayer}}:\textcolor{keyword}{public} \mbox{\hyperlink{namespace_layer}{Layer}}\{}
  17. \DoxyCodeLine{13 }
  18. \DoxyCodeLine{14 \textcolor{keyword}{private}:}
  19. \DoxyCodeLine{15 \textcolor{keywordtype}{size\_t} nf,ni,nj;}
  20. \DoxyCodeLine{16 \textcolor{keywordtype}{size\_t} mf,mi,mj;}
  21. \DoxyCodeLine{17 \textcolor{keywordtype}{size\_t} p,q;}
  22. \DoxyCodeLine{18 \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} K;}
  23. \DoxyCodeLine{19 \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} b;}
  24. \DoxyCodeLine{20 \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} nabla\_K;}
  25. \DoxyCodeLine{21 \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} nabla\_b;}
  26. \DoxyCodeLine{22 }
  27. \DoxyCodeLine{23 \textcolor{keyword}{public}:}
  28. \DoxyCodeLine{24 \mbox{\hyperlink{class_layer_1_1_convolution_layer_a7d76977d90ca11bd1d36dbade396f1c6}{ConvolutionLayer}}(\textcolor{keywordtype}{size\_t} nf,\textcolor{keywordtype}{size\_t} ni,\textcolor{keywordtype}{size\_t} nj,\textcolor{keywordtype}{size\_t} p,\textcolor{keywordtype}{size\_t} q,\textcolor{keywordtype}{size\_t} mf);}
  29. \DoxyCodeLine{25 \mbox{\hyperlink{class_layer_1_1_convolution_layer_a0b79936c340c1667025dfda84c4c9273}{\string~ConvolutionLayer}}();}
  30. \DoxyCodeLine{26 \textcolor{keywordtype}{void} \mbox{\hyperlink{class_layer_1_1_convolution_layer_a4ec9a15fc2bb960f6c02841c6293d61a}{init}}(\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} mu,\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} sigma);}
  31. \DoxyCodeLine{27 \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_convolution_layer_a8315ef1016d165f8986fb3d4c2b65276}{feed\_forward}}(\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_af2ebcf019bc0e4b97f41fc9205706665}{x}}) \textcolor{keyword}{override};}
  32. \DoxyCodeLine{28 \textcolor{keywordtype}{void} \mbox{\hyperlink{class_layer_1_1_convolution_layer_a435dfabf3e575ddf07a11304e2d4fe84}{init\_nabla}}() \textcolor{keyword}{override};}
  33. \DoxyCodeLine{29 \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_convolution_layer_a5ccdf83a1217d57678c8bedcecc43a2a}{back\_propagation}}(\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} e) \textcolor{keyword}{override};}
  34. \DoxyCodeLine{30 \textcolor{keywordtype}{void} \mbox{\hyperlink{class_layer_1_1_convolution_layer_a4764f42dfc31ad2d848e0d1c22b0704b}{update}}(\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}} eta) \textcolor{keyword}{override};}
  35. \DoxyCodeLine{31 \};}
  36. \DoxyCodeLine{32 \}}
  37. \DoxyCodeLine{33 \textcolor{preprocessor}{\#endif}}
  38. \end{DoxyCode}