[读书笔记]How the backpropagation algorithm works(未完待续)

前一段时间看了 Michael Nielsen写的文章,我觉得是目前看到讲神经网络后向传播算法讲的最好的一篇文章了。下面提其精要:

  1. 符号
    wljk : the weight for the connection from the kth neuron in the (l1)th layer to the jth neuron in the lth layer

    blj : the bias of the jth neuron in the lth layer

    zlj : the weighted input

    alj : the activation of the jth neuron in the lth layer

    各符号的例子如下:
    这里写图片描述
    [读书笔记]How the backpropagation algorithm works(未完待续)_第1张图片

  2. 公式

    z a 的计算公式如下:

    zlj=kwljkal1k+blj

    alj=σ(kwljkal1k+blj)

    写成矩阵形式:

    zlwlal1+bl

    al=σ(wlal1+bl)

    损失函数:

    C=12nxy(x)aL(x)2

  3. 后向传播算法intuition
    对于 jth neuron in layer l , 如果我们让 zlj 变化 Δzlj ,那么该神经元的输出由 σ(zlj) 变成了 σ(zlj+Δzlj) ,并且损失函数值变化了 CzljΔzlj
    所以我们可以让 Δzlj Czlj 符号相反,达到让损失函数值下降。一直到 Czlj 无限接近0,那么此时无论怎么变化 zlj 都难以让损失函数值下降了,此时我们宣布:该神经元达到最优状态了.
    基于这个观察,我们将neuron j in layer l 的误差 δlj 定义为:

    δljCzlj.

  4. 后向传播算法的四大公式
    这里写图片描述

    详细解释:
    BP1:

    δLj=CaLjσ(zLj)

    δL=aCσ(zL)

    δL=(aLy)σ(zL)

    BP2:
    δl=((wl+1)Tδl+1)σ(zl)

    BP3:
    Cblj=δlj

    Cb=δ

    BP4:
    Cwljk=al1kδlj

    Cw=ainδout

你可能感兴趣的:(机器学习)