HTML5¼¼Êõ

¡¾Éî¶ÈѧϰϵÁС¿¾í»ýÉñ¾­ÍøÂçÏê½â(¶þ)¡ª¡ª×Ô¼ºÊÖдһ¸ö¾í»ýÉñ¾­ÍøÂç - Charlotte77

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-11-23 08:01 ÎÒÒªÆÀÂÛ( )

ÉÏƪÎÄÕÂÖÐÎÒÃǽ²½âÁ˾í»ýÉñ¾­ÍøÂçµÄ»ù±¾Ô­Àí£¬°üÀ¨¼¸¸ö»ù±¾²ãµÄ¶¨Òå¡¢ÔËËã¹æÔòµÈ¡£±¾ÎÄÖ÷Ҫд¾í»ýÉñ¾­ÍøÂçÈçºÎ½øÐÐÒ»´ÎÍêÕûµÄѵÁ·£¬°üÀ¨Ç°Ïò´«²¥ºÍ·´Ïò´«²¥£¬²¢×Ô¼ºÊÖдһ¸ö¾í»ýÉñ¾­ÍøÂç¡£Èç¹û²»Á˽â»ù±¾Ô­ÀíµÄ£¬¿ÉÒÔÏÈ¿´¿´ÉÏƪÎÄÕ£º ¡¾Éî¶ÈѧϰϵÁС¿¾í»ý

¡¡¡¡ÉÏƪÎÄÕÂÖÐÎÒÃǽ²½âÁ˾í»ýÉñ¾­ÍøÂçµÄ»ù±¾Ô­Àí£¬°üÀ¨¼¸¸ö»ù±¾²ãµÄ¶¨Òå¡¢ÔËËã¹æÔòµÈ¡£±¾ÎÄÖ÷Ҫд¾í»ýÉñ¾­ÍøÂçÈçºÎ½øÐÐÒ»´ÎÍêÕûµÄѵÁ·£¬°üÀ¨Ç°Ïò´«²¥ºÍ·´Ïò´«²¥£¬²¢×Ô¼ºÊÖдһ¸ö¾í»ýÉñ¾­ÍøÂç¡£Èç¹û²»Á˽â»ù±¾Ô­ÀíµÄ£¬¿ÉÒÔÏÈ¿´¿´ÉÏƪÎÄÕ£º¡¾Éî¶ÈѧϰϵÁС¿¾í»ýÉñ¾­ÍøÂç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д³öÀ´:

 

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • LinuxϵÁн̳̣¨¶þÊ®¶þ£©¡ª¡ªLinuxµÄbash±äÁ¿ - YSOcean

    LinuxϵÁн̳̣¨¶þÊ®¶þ£©¡ª¡ªLinuxµÄbash±äÁ¿ - YSOcean

    2017-11-19 08:00

  • ¼«¼ò°æASP.NET Coreѧϰ·¾¶¼°½Ì³Ì - ÌÚ·É£¨Jesse)

    ¼«¼ò°æASP.NET Coreѧϰ·¾¶¼°½Ì³Ì - ÌÚ·É£¨Jesse)

    2017-11-17 14:02

  • [Éî¶Èѧϰ]ʵÏÖÒ»¸ö²©ÞÄÐ͵ÄAI£¬´ÓÎå×ÓÆ忪ʼ£¨1£© - xerwin

    [Éî¶Èѧϰ]ʵÏÖÒ»¸ö²©ÞÄÐ͵ÄAI£¬´ÓÎå×ÓÆ忪ʼ£¨1£© - xerwin

    2017-11-15 12:01

  • JavaScprit30-5 ѧϰ±Ê¼Ç - ß÷20

    JavaScprit30-5 ѧϰ±Ê¼Ç - ß÷20

    2017-10-23 11:07

ÍøÓѵãÆÀ
¹