7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

『ゼロから作るDeep Learning』5章 メモ

Last updated at Posted at 2017-02-10

斎藤康毅:『ゼロから作るDeep Learning』オライリージャパン,2016.
理解を深めるためにメモします.

5章 誤差逆伝播法

誤差逆伝播法
学習の際,重みパラメータに関する損失関数の勾配を数値微分によって求めたが,数値微分より,効率よく行う手法

導入される数学の概念

  • 計算グラフ (computational graph)
  • 順伝播 (forward propagation)
  • 逆伝播 (backward propagation)
  • アフィン (Affine) 変換
    幾何学の分野で,ニューラルネットワークの順伝播で行う行列の内積のこと

式 $(5.12)$ を丁寧に書く.

まず,
$
\begin{eqnarray}
y
&=&
\dfrac {1} { 1+\exp \left( -x\right)}
\tag{5.9}
\end{eqnarray}
$

なので,式 $(5.9)$ より
$$
y^{2}=
\dfrac {1^{2}} {\left( 1+\exp \left( -x\right) \right) ^{2}}
$$

を準備しておく.
式 $(5.12)$ を解いていく.

\begin{eqnarray}
\dfrac {\partial L} {dy}y^{2}\exp \left( -x\right)
&=& 
\dfrac {\partial L} {dy}\dfrac {1} {\left( 1+\exp \left( -x\right) \right) ^{2}}\exp \left( -x\right)\\
&=& 
\dfrac {\partial L} {dy}\dfrac {1^{2}} {\left( 1+\exp \left( -x\right) \right)}\dfrac{\exp \left( -x\right)}{\left( 1+\exp \left( -x\right) \right)}\\
&=& 
\dfrac {\partial L} {dy}y\dfrac{\exp \left( -x\right)}{ 1+\exp \left( -x\right)}\\
&=& 
\dfrac {\partial L} {dy}y\left(\dfrac {\exp \left( -x\right)} { 1+\exp \left( -x\right)}+\dfrac {1} { 1+\exp \left( -x\right)}-\dfrac {1} { 1+\exp \left( -x\right)}\right)\\
&=& 
\dfrac {\partial L} {dy}y\left(\dfrac {1+\exp \left( -x\right)} { 1+\exp \left( -x\right)}-\dfrac {1} { 1+\exp \left( -x\right)}\right)\\
&=& 
\dfrac {\partial L} {dy}y\left(1-\dfrac {1} { 1+\exp \left( -x\right)}\right)\\
&=& 
\dfrac {\partial L} {dy}y(1-y)\\
\end{eqnarray}

間違い等あれば教えていただけると嬉しいです.

随時更新するかも :snowflake:

7
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?