BP神经网络误差反向传播公式

1. ∂ e ∂ W l \frac{\partial e}{\partial W^{l}} Wle ∂ e ∂ B l \frac{\partial e}{\partial B^{l}} Ble

损失函数 : 损失函数: 损失函数: e = g ( n e t l ) e=g\left(net^{l}\right) e=g(netl) 第 l 层净输入 : 第l层净输入: l层净输入: n e t l = W l ⋅ O l − 1 + B l net^{l}=W^{l}\cdot O^{l-1}+B^{l} netl=WlOl1+Bl 损失函数的微分 : 损失函数的微分: 损失函数的微分: d e = t r ( ∂ e ∂ n e t l T ⋅ d n e t l ) de=tr\left(\frac{\partial e}{\partial net^{l}}^{T}\cdot dnet^{l}\right) de=tr(netleTdnetl) 净输入的微分 : 净输入的微分: 净输入的微分: d n e t l = d W l ⋅ O l − 1 + d B l dnet^{l} =dW^{l}\cdot O^{l-1}+dB^{l} dnetl=dWlOl1+dBl

d e = t r ( ∂ e ∂ n e t l T ⋅ ( d W l ⋅ O l − 1 + d B l ) ) de=tr\left(\frac{\partial e}{\partial net^{l}}^{T}\cdot \left(dW^{l}\cdot O^{l-1}+dB^{l}\right)\right) de=tr(netleT(dWlOl1+dBl)) = t r ( ∂ e ∂ n e t l T ⋅ d W l ⋅ O l − 1 + ∂ e ∂ n e t l T ⋅ d B l ) =tr\left(\frac{\partial e}{\partial net^{l}}^{T}\cdot dW^{l}\cdot O^{l-1}+\frac{\partial e}{\partial net^{l}}^{T}\cdot dB^{l}\right) =tr(netleTdWlOl1+netleTdBl) = t r ( O l − 1 ⋅ ∂ e ∂ n e t l T ⋅ d W l + ∂ e ∂ n e t l T ⋅ d B l ) =tr\left(O^{l-1}\cdot \frac{\partial e}{\partial net^{l}}^{T}\cdot dW^{l}+\frac{\partial e}{\partial net^{l}}^{T}\cdot dB^{l}\right) =tr(Ol1netleTdWl+netleTdBl)

损失函数对 l 层权值 W l 的偏导 : 损失函数对l层权值W^{l}的偏导: 损失函数对l层权值Wl的偏导: ∂ e ∂ W l = ( O l − 1 ⋅ ∂ e ∂ n e t l T ) T \frac{\partial e}{\partial W^{l}}=\left(O^{l-1}\cdot \frac{\partial e}{\partial net^{l}}^{T}\right)^{T} Wle=(Ol1netleT)T = ∂ e ∂ n e t l ⋅ ( O l − 1 ) T =\frac{\partial e}{\partial net^{l}}\cdot \left(O^{l-1}\right)^{T} =netle(Ol1)T 损失函数对 l 层偏移 B l 的偏导 : 损失函数对l层偏移B^{l}的偏导: 损失函数对l层偏移Bl的偏导: ∂ e ∂ B l = ∂ e ∂ n e t l \frac{\partial e}{\partial B^{l}}=\frac{\partial e}{\partial net^{l}} Ble=netle

2. ∂ e ∂ n e t l \frac{\partial e}{\partial net^{l}} netle递推公式

损失函数 : 损失函数: 损失函数: e = g ( n e t l + 1 ) e=g\left(net^{l+1}\right) e=g(netl+1) 第 l + 1 层的净输入 : 第l+1层的净输入: l+1层的净输入: n e t l + 1 = W l + 1 ⋅ O l + B l + 1 net^{l+1}=W^{l+1}\cdot O^l+B^{l+1} netl+1=Wl+1Ol+Bl+1 第 l 层净输出 : 第l层净输出: l层净输出: O l = f ( n e t l ) O^l=f\left(net^l\right) Ol=f(netl) 损失函数的微分 : 损失函数的微分: 损失函数的微分: d e = t r ( ∂ e ∂ n e t l + 1 T ⋅ d n e t l + 1 ) de=tr\left(\frac{\partial e}{\partial net^{l+1}}^T\cdot dnet^{l+1}\right) de=tr(netl+1eTdnetl+1) 净输入的微分 : 净输入的微分: 净输入的微分: d n e t l + 1 = W l + 1 ⋅ d O l dnet^{l+1}=W^{l+1} \cdot dO^l dnetl+1=Wl+1dOl 净输出的微分 : 净输出的微分: 净输出的微分: d O l = f ′ ( n e t l ) ⊙ d n e t l dO^l=f^{'}\left(net^{l}\right)\odot dnet^{l} dOl=f(netl)dnetl

d e = t r ( ∂ e ∂ n e t l + 1 T ⋅ W l + 1 ⋅ ( f ′ ( n e t l ) ⊙ d n e t l ) ) de=tr\left(\frac{\partial e}{\partial net^{l+1}}^T\cdot W^{l+1}\cdot \left(f^{'}\left(net^{l}\right) \odot dnet^{l}\right)\right) de=tr(netl+1eTWl+1(f(netl)dnetl)) = t r ( ( ( ∂ e ∂ n e t l + 1 T ⋅ W l + 1 ) ⊙ ( f ′ ( n e t l ) ) T ) ⋅ d n e t l ) =tr\left (\left(\left(\frac{\partial e}{\partial net^{l+1}}^T\cdot W^{l+1}\right)\odot \left(f^{'}\left(net^{l}\right)\right)^{T}\right)\cdot dnet^{l}\right) =tr(((netl+1eTWl+1)(f(netl))T)dnetl)

损失函数对第 l 层净输入与第 l + 1 层净输入偏导的递归式 : 损失函数对第l层净输入与第l+1层净输入偏导的递归式: 损失函数对第l层净输入与第l+1层净输入偏导的递归式: ∂ e ∂ n e t l = ( ( ∂ e ∂ n e t l + 1 T ⋅ W l + 1 ) ⊙ ( f ′ ( n e t l ) ) T ) T \frac{\partial e}{\partial net^{l}}=\left(\left(\frac{\partial e}{\partial net^{l+1}}^T\cdot W^{l+1}\right)\odot \left(f^{'}\left(net^{l}\right)\right)^{T}\right)^{T} netle=((netl+1eTWl+1)(f(netl))T)T = ( ∂ e ∂ n e t l + 1 T ⋅ W l + 1 ) T ⊙ f ′ ( n e t l ) =\left(\frac{\partial e}{\partial net^{l+1}}^T\cdot W^{l+1}\right)^{T}\odot f^{'}\left(net^{l}\right) =(netl+1eTWl+1)Tf(netl) = ( ( W l + 1 ) T ⋅ ∂ e ∂ n e t l + 1 ) ⊙ f ′ ( n e t l ) =\left(\left(W^{l+1}\right)^{T}\cdot \frac{\partial e}{\partial net^{l+1}}\right)\odot f^{'}\left(net^{l}\right) =((Wl+1)Tnetl+1e)f(netl)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值