Backpropagation PDF 1644779488
Backpropagation PDF 1644779488
Part 2
Week 16
Backpropagation
2
Updating bias
On the right is our fitting curve for the data generated by our neural
network. As one may notice, the predicted curve has a high bias. Let's reduce
it by updating b5.
3
Updating bias
Similarly to the previous case, we can use the sum of squared residuals as the
loss function. Finding the best fit is something
we are already comfortable with.
4
Updating bias through GD
5
Updating bias
In order to calculate the gradient, we
need to find the following derivative:
d(SSR)
d(b5)
As
SSR = ∑(Truei – Predi)2
Predi = softplus(i1,1 × w3 + b3 +
+ i1,2 × w4 + b4) + b5
Using the chain rule:
d(SSR) d(SSR) d(Pred)
= ×
d(b5) d(Pred) d(b5)
6
Updating bias
d(SSR) d(SSR) d(Pred)
= ×
d(b5) d(Pred) d(b5)
d(SSR)
SSR = ∑(Truei – Predi) =>
2
= -2 × ∑(Truei – Predi)
d(Pred)
Predi = softplus(i1,1 × w3 + b3 + i1,2 × w4 + b4) + b5 =>
7
Updating weights and biases
d(SSR) = d(SSR) × d(Pred)
d(b5) d(Pred) d(b5)
d(SSR) = d(SSR) × d(Pred)
d(b3) d(Pred) d(b3)
d(SSR) = d(SSR) × d(Pred)
d(w3) d(Pred) d(w3)
d(SSR) = d(SSR) × d(Pred) × d(i1,1)
d(b1) d(Pred) d(i1,1) d(b1)
d(SSR) = d(SSR) × d(Pred) × d(i1,1)
d(w1) d(Pred) d(i1,1) d(w1)
8