反向传导算法
From Ufldl
Line 138: | Line 138: | ||
\end{align} | \end{align} | ||
</math> | </math> | ||
+ | [译者注:由于原作者简化了推导过程,会影响理解,我将推导过程补全为以下公式: | ||
+ | :<math> | ||
+ | \delta^{(n_l)}_i = \frac{\partial}{partial z^{n_l}_i}J(W,b;x,y)\;\; | ||
+ | = \frac{\partial}{partial z^{n_l}_i}\frac{1}{2} \left\|y - h_{W,b}(x)\right\|^2\;\; | ||
+ | = - (y_i - a^{(n_l)}_i) \cdot f'(z^{(n_l)}_i) | ||
+ | </math> | ||
+ | ] | ||
<li>对<math>l = n_l-1, n_l-2, n_l-3, \ldots, 2</math>的各个层,第<math>l</math>层的第<math>i</math>个节点的残差项计算方法如下: | <li>对<math>l = n_l-1, n_l-2, n_l-3, \ldots, 2</math>的各个层,第<math>l</math>层的第<math>i</math>个节点的残差项计算方法如下: | ||
::<math> | ::<math> | ||
Line 143: | Line 150: | ||
</math> | </math> | ||
[译者注:由于原作者简化了推导过程,使我本人看着十分费解,于是就自己推导了一遍,将过程写在这里: | [译者注:由于原作者简化了推导过程,使我本人看着十分费解,于是就自己推导了一遍,将过程写在这里: | ||
- | :<math> | + | :<math> |
+ | \delta^{(n_{l-1})} = \frac{\partial}{partial z^{n_l}_i} | ||
+ | </math> | ||
根据递推过程,将n_l-1与n_l的关系替换为l与l+1的关系,可以得到原作者的结果: | 根据递推过程,将n_l-1与n_l的关系替换为l与l+1的关系,可以得到原作者的结果: | ||
:<math>公式</math> | :<math>公式</math> |