pooling_8hpp_source.tex 5.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. \hypertarget{pooling_8hpp_source}{}\doxysection{pooling.\+hpp}
  2. \label{pooling_8hpp_source}\index{src/layers/pooling.hpp@{src/layers/pooling.hpp}}
  3. \mbox{\hyperlink{pooling_8hpp}{Go to the documentation of this file.}}
  4. \begin{DoxyCode}{0}
  5. \DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef POOLING\_LAYER\_HPP}}
  6. \DoxyCodeLine{2 \textcolor{preprocessor}{\#define POOLING\_LAYER\_HPP}}
  7. \DoxyCodeLine{3 }
  8. \DoxyCodeLine{4 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{layer_8hpp}{layer.hpp}}"{}}}
  9. \DoxyCodeLine{5 }
  10. \DoxyCodeLine{6 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespace_layer}{Layer}}\{}
  11. \DoxyCodeLine{7 }
  12. \DoxyCodeLine{8 \textcolor{keyword}{class }\mbox{\hyperlink{class_layer_1_1_pooling}{Pooling}}:\textcolor{keyword}{public} \mbox{\hyperlink{namespace_layer}{Layer}}\{}
  13. \DoxyCodeLine{9 \textcolor{keyword}{public}:}
  14. \DoxyCodeLine{10 \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_a39aaffa3c994629ae48acddd980debe0}{nf}};}
  15. \DoxyCodeLine{11 \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_aa5039166bf8e18418f4173f778adc199}{ni}};}
  16. \DoxyCodeLine{12 \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_a2d3205efd40debac2409d505fdcc7ecc}{nj}};}
  17. \DoxyCodeLine{13 \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_a9fc1a9baf77fa32e25ccf74c088b45d5}{p}};}
  18. \DoxyCodeLine{14 \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_ab0e8c8cc580e5fdc0f86437ee95b9d94}{q}};}
  19. \DoxyCodeLine{15 \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_a1360199bea24a84eba49c82fa7c85afa}{mi}};}
  20. \DoxyCodeLine{16 \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_a70a33709b8f2e3d623b2b7be016e0097}{mj}};}
  21. \DoxyCodeLine{17 \textcolor{keyword}{public}:}
  22. \DoxyCodeLine{18 \mbox{\hyperlink{class_layer_1_1_pooling_ae4782bcaa9306742b54d01d1f26c9837}{Pooling}}(\textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_a39aaffa3c994629ae48acddd980debe0}{nf}},\textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_aa5039166bf8e18418f4173f778adc199}{ni}},\textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_a2d3205efd40debac2409d505fdcc7ecc}{nj}},\textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_a9fc1a9baf77fa32e25ccf74c088b45d5}{p}},\textcolor{keywordtype}{size\_t} \mbox{\hyperlink{class_layer_1_1_pooling_ab0e8c8cc580e5fdc0f86437ee95b9d94}{q}});}
  23. \DoxyCodeLine{19 \mbox{\hyperlink{class_layer_1_1_pooling_adf15e44fc1480e17420808c15aa44067}{\string~Pooling}}()\{\};}
  24. \DoxyCodeLine{20 \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_pooling_a91e5d2cfd897d0f196de969909c92afc}{feed\_forward}}(\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_layer_af2ebcf019bc0e4b97f41fc9205706665}{x}}) \textcolor{keyword}{override};}
  25. \DoxyCodeLine{21 \textcolor{keywordtype}{void} \mbox{\hyperlink{class_layer_1_1_pooling_a5c59ea7b198d3e42e334051f7a6e4645}{init\_nabla}}()\textcolor{keyword}{ override }\{\};}
  26. \DoxyCodeLine{22 \mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} \mbox{\hyperlink{class_layer_1_1_pooling_a3dc9bb1a69d3d7c2f627da9d2b737ac2}{back\_propagation}}(\mbox{\hyperlink{vector_8hpp_ab9855a300a7759f4c0f85067d44e4c38}{Vector}} e) \textcolor{keyword}{override};}
  27. \DoxyCodeLine{23 \textcolor{keywordtype}{void} \mbox{\hyperlink{class_layer_1_1_pooling_ab04c4682d176b4bc760aee53c0ecc36a}{update}}(\mbox{\hyperlink{vector_8hpp_a4b04262b81aa7d31eb5d2f607e2a35de}{Real}})\textcolor{keyword}{ override }\{\};}
  28. \DoxyCodeLine{24 \};}
  29. \DoxyCodeLine{25 }
  30. \DoxyCodeLine{26 \textcolor{keyword}{inline}}
  31. \DoxyCodeLine{27 \mbox{\hyperlink{class_layer_1_1_pooling_ae4782bcaa9306742b54d01d1f26c9837}{Pooling::Pooling}}(\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\_):}
  32. \DoxyCodeLine{28 \mbox{\hyperlink{namespace_layer}{Layer}}(nf\_*ni\_*nj\_,nf\_*((ni\_+p\_-\/1)/p\_)*((nj\_+q\_-\/1)/q\_))\{}
  33. \DoxyCodeLine{29 \mbox{\hyperlink{class_layer_1_1_pooling_a39aaffa3c994629ae48acddd980debe0}{nf}}=nf\_;}
  34. \DoxyCodeLine{30 \mbox{\hyperlink{class_layer_1_1_pooling_aa5039166bf8e18418f4173f778adc199}{ni}}=ni\_;}
  35. \DoxyCodeLine{31 \mbox{\hyperlink{class_layer_1_1_pooling_a2d3205efd40debac2409d505fdcc7ecc}{nj}}=nj\_;}
  36. \DoxyCodeLine{32 \mbox{\hyperlink{class_layer_1_1_pooling_a9fc1a9baf77fa32e25ccf74c088b45d5}{p}}=p\_;}
  37. \DoxyCodeLine{33 \mbox{\hyperlink{class_layer_1_1_pooling_ab0e8c8cc580e5fdc0f86437ee95b9d94}{q}}=q\_;}
  38. \DoxyCodeLine{34 \mbox{\hyperlink{class_layer_1_1_pooling_a1360199bea24a84eba49c82fa7c85afa}{mi}}=(\mbox{\hyperlink{class_layer_1_1_pooling_aa5039166bf8e18418f4173f778adc199}{ni}}+\mbox{\hyperlink{class_layer_1_1_pooling_a9fc1a9baf77fa32e25ccf74c088b45d5}{p}}-\/1)/\mbox{\hyperlink{class_layer_1_1_pooling_a9fc1a9baf77fa32e25ccf74c088b45d5}{p}};}
  39. \DoxyCodeLine{35 \mbox{\hyperlink{class_layer_1_1_pooling_a70a33709b8f2e3d623b2b7be016e0097}{mj}}=(\mbox{\hyperlink{class_layer_1_1_pooling_a2d3205efd40debac2409d505fdcc7ecc}{nj}}+\mbox{\hyperlink{class_layer_1_1_pooling_ab0e8c8cc580e5fdc0f86437ee95b9d94}{q}}-\/1)/\mbox{\hyperlink{class_layer_1_1_pooling_a9fc1a9baf77fa32e25ccf74c088b45d5}{p}};}
  40. \DoxyCodeLine{36 \}}
  41. \DoxyCodeLine{37 }
  42. \DoxyCodeLine{38 \}}
  43. \DoxyCodeLine{39 }
  44. \DoxyCodeLine{40 \textcolor{preprocessor}{\#endif}}
  45. \end{DoxyCode}