Lesson 8 of 15
Multi-Layer Backpropagation
Backprop Through Two Layers
Now extend backpropagation to a two-layer network. The architecture:
Forward Pass
Compute in order.
Backward Pass
Work backwards using the chain rule:
To reach layer 1, we propagate the error signal through :
This is the backpropagation algorithm: forward to compute activations, backward to propagate error signals.
Your Task
Implement two_layer_backward(x, w1, b1, w2, b2, y) returning (dw1, db1, dw2, db2).
Python runtime loading...
Loading...
Click "Run" to execute your code.