¡¡¡¡ÉÏƪÎÄÕÂÖÐÎÒÃǽ²½âÁ˾í»ýÉñ¾ÍøÂçµÄ»ù±¾ÔÀí£¬°üÀ¨¼¸¸ö»ù±¾²ãµÄ¶¨Òå¡¢ÔËËã¹æÔòµÈ¡£±¾ÎÄÖ÷Ҫд¾í»ýÉñ¾ÍøÂçÈçºÎ½øÐÐÒ»´ÎÍêÕûµÄѵÁ·£¬°üÀ¨Ç°Ïò´«²¥ºÍ·´Ïò´«²¥£¬²¢×Ô¼ºÊÖдһ¸ö¾í»ýÉñ¾ÍøÂç¡£Èç¹û²»Á˽â»ù±¾ÔÀíµÄ£¬¿ÉÒÔÏÈ¿´¿´ÉÏƪÎÄÕ£º¡¾Éî¶ÈѧϰϵÁС¿¾í»ýÉñ¾ÍøÂçCNNÔÀíÏê½â(Ò»)¡ª¡ª»ù±¾ÔÀí
¾í»ýÉñ¾ÍøÂçµÄÇ°Ïò´«²¥
¡¡¡¡Ê×ÏÈÎÒÃÇÀ´¿´Ò»¸ö×î¼òµ¥µÄ¾í»ýÉñ¾ÍøÂ磺
¡¡1.ÊäÈë²ã---->¾í»ý²ã
¡¡¡¡ÒÔÉÏÒ»½ÚµÄÀý×ÓΪÀý£¬ÊäÈëÊÇÒ»¸ö4*4 µÄimage£¬¾¹ýÁ½¸ö2*2µÄ¾í»ýºË½øÐоí»ýÔËËãºó£¬±ä³ÉÁ½¸ö3*3µÄfeature_map
¡¡¡¡ÒÔ¾í»ýºËfilter1ΪÀý(stride = 1 )£º
¡¡¡¡¼ÆËãµÚÒ»¸ö¾í»ý²ãÉñ¾Ôªo11µÄÊäÈë:¡¡
\begin{equation}
\begin{aligned}
\ net_{o_{11}}&= conv (input,filter)\\
&= i_{11} \times h_{11} + i_{12} \times h_{12} +i_{21} \times h_{21} + i_{22} \times h_{22}\\
&=1 \times 1 + 0 \times (-1) +1 \times 1 + 1 \times (-1)=1
\end{aligned}
\end{equation}
¡¡¡¡Éñ¾Ôªo11µÄÊä³ö:(´Ë´¦Ê¹ÓÃRelu¼¤»îº¯Êý)
\begin{equation}
\begin{aligned}
out_{o_{11}} &= activators(net_{o_{11}}) \\
&=max(0,net_{o_{11}}) = 1
\end{aligned}
\end{equation}
¡¡¡¡ÆäËûÉñ¾Ôª¼ÆË㷽ʽÏàͬ
¡¡2.¾í»ý²ã---->³Ø»¯²ã
¡¡¡¡
¡¡¡¡¼ÆËã³Ø»¯²ãm11 µÄÊäÈë(È¡´°¿ÚΪ 2 * 2),³Ø»¯²ãûÓм¤»îº¯Êý¡¡¡¡
\begin{equation}
\begin{aligned}
net_{m_{11}} &= max(o_{11},o_{12},o_{21},o_{23}) = 1\\
&out_{m_{11}} = net_{m_{11}} = 1
\end{aligned}
\end{equation}
¡¡¡¡3.³Ø»¯²ã---->È«Á¬½Ó²ã
¡¡¡¡³Ø»¯²ãµÄÊä³öµ½flatten²ã°ÑËùÓÐÔªËØ¡°ÅÄƽ¡±£¬È»ºóµ½È«Á¬½Ó²ã¡£
¡¡¡¡4.È«Á¬½Ó²ã---->Êä³ö²ã
¡¡¡¡È«Á¬½Ó²ãµ½Êä³ö²ã¾ÍÊÇÕý³£µÄÉñ¾ÔªÓëÉñ¾ÔªÖ®¼äµÄÁÚ½ÓÏàÁ¬£¬Í¨¹ýsoftmaxº¯Êý¼ÆËãºóÊä³öµ½output£¬µÃµ½²»Í¬Àà±ðµÄ¸ÅÂÊÖµ£¬Êä³ö¸ÅÂÊÖµ×î´óµÄ¼´Îª¸ÃͼƬµÄÀà±ð¡£
¾í»ýÉñ¾ÍøÂçµÄ·´Ïò´«²¥
¡¡¡¡´«Í³µÄÉñ¾ÍøÂçÊÇÈ«Á¬½ÓÐÎʽµÄ£¬Èç¹û½øÐз´Ïò´«²¥£¬Ö»ÐèÒªÓÉÏÂÒ»²ã¶ÔÇ°Ò»²ã²»¶ÏµÄÇóÆ«µ¼£¬¼´ÇóÁ´Ê½Æ«µ¼¾Í¿ÉÒÔÇó³öÿһ²ãµÄÎó²îÃô¸ÐÏȻºóÇó³öȨÖغÍÆ«ÖÃÏîµÄÌݶȣ¬¼´¿É¸üÐÂȨÖØ¡£¶ø¾í»ýÉñ¾ÍøÂçÓÐÁ½¸öÌØÊâµÄ²ã£º¾í»ý²ãºÍ³Ø»¯²ã¡£³Ø»¯²ãÊä³öʱ²»ÐèÒª¾¹ý¼¤»îº¯Êý£¬ÊÇÒ»¸ö»¬¶¯´°¿ÚµÄ×î´óÖµ£¬Ò»¸ö³£Êý£¬ÄÇôËüµÄÆ«µ¼ÊÇ1¡£³Ø»¯²ãÏ൱ÓÚ¶ÔÉϲãͼƬ×öÁËÒ»¸öѹËõ£¬Õâ¸ö·´ÏòÇóÎó²îÃô¸ÐÏîʱÓ봫ͳµÄ·´Ïò´«²¥·½Ê½²»Í¬¡£´Ó¾í»ýºóµÄfeature_map·´Ïò´«²¥µ½Ç°Ò»²ãʱ£¬ÓÉÓÚÇ°Ïò´«²¥Ê±ÊÇͨ¹ý¾í»ýºË×ö¾í»ýÔËËãµÃµ½µÄfeature_map£¬ËùÒÔ·´Ïò´«²¥Ó봫ͳµÄÒ²²»Ò»Ñù£¬ÐèÒª¸üоí»ýºËµÄ²ÎÊý¡£ÏÂÃæÎÒÃǽéÉÜһϳػ¯²ãºÍ¾í»ý²ãÊÇÈçºÎ×ö·´Ïò´«²¥µÄ¡£
¡¡¡¡ÔÚ½éÉÜ֮ǰ£¬Ê×ÏȻعËһϴ«Í³µÄ·´Ïò´«²¥·½·¨£º
¡¡¡¡1.ͨ¹ýÇ°Ïò´«²¥¼ÆËãÿһ²ãµÄÊäÈëÖµ$net_{i,j}$ (Èç¾í»ýºóµÄfeature_mapµÄµÚÒ»¸öÉñ¾ÔªµÄÊäÈ룺$net_{i_{11}}$)
¡¡¡¡2.·´Ïò´«²¥¼ÆËãÿ¸öÉñ¾ÔªµÄÎó²îÏî$\delta_{i,j}$ £¬$\delta_{i,j} = \frac{\partial E}{\partial net_{i,j}}$£¬ÆäÖÐEΪËðʧº¯Êý¼ÆËãµÃµ½µÄ×ÜÌåÎó²î£¬¿ÉÒÔÓÃƽ·½²î£¬½»²æìصȱíʾ¡£
¡¡¡¡3.¼ÆËãÿ¸öÉñ¾ÔªÈ¨ÖØ$w_{i,j}$ µÄÌݶȣ¬$\eta_{i,j} = \frac{\partial E}{\partial net_{i,j}} \cdot \frac{\partial net_{i,j}}{\partial w_{i,j}} = \delta_{i,j} \cdot out_{i,j}$
¡¡¡¡4.¸üÐÂȨÖØ $w_{i,j} = w_{i,j}-\lambda \cdot \eta_{i,j}$(ÆäÖÐ$\lambda$ΪѧϰÂÊ)
¡¡¡¡¾í»ý²ãµÄ·´Ïò´«²¥
¡¡¡¡ÓÉÇ°Ïò´«²¥¿ÉµÃ£º
\begin{equation}
\begin{aligned}
\ net_{o_{11}}&= conv (input,filter)\\
&= i_{11} \times h_{11} + i_{12} \times h_{12} +i_{21} \times h_{21} + i_{22} \times h_{22}\\
out_{o_{11}} &= activators(net_{o_{11}}) \\
&=max(0,net_{o_{11}})
\end{aligned}
\end{equation}
¡¡¡¡ËùÒÔÉÏÒ»²ãµÄÊä³öÒ²¾ÍÊÇÕâÒ»²ãµÄÊäÈ룬¼´£º$out_{i_{11}} = activators(net_{i_{11}}) = i_{11}$
¡¡¡¡Ê×ÏȼÆËãÊäÈë²ãµÄÎó²îÏî$\delta_{11}$£º
$$\delta_{11} = \frac{\partial E}{\partial net_{o_{11}}} =\frac{\partial E}{\partial i_{11}} \cdot \frac{\partial i_{11}}{\partial net_{i_{11}}}$$(×¢ÒâÕâÀïÊÇ$net_{i_{11}}$,´ú±íµÄÊÇÉÏÒ»²ãµÄÊäÈ룬²»ÊÇ$net_{o_{11}}$)
¡¡¡¡ÏȼÆËã$\frac{\partial E}{\partial i_{11}} $
¡¡¡¡´Ë´¦ÎÒÃDz¢²»Çå³þ$\frac{\partial E}{\partial i_{11}}$ÔõôË㣬ÄÇ¿ÉÒÔÏÈ°Ñinput²ãͨ¹ý¾í»ýºË×öÍê¾í»ýÔËËãºóµÄÊä³öfeature_mapд³öÀ´:
¡¡