You have just written the backward pass for a small regression network, and you want to check it before you trust it. The network takes two inputs, has two ReLU hidden neurons, and has one output neuron with no activation:
h1=ReLU(w11x1+w12x2+b1),h2=ReLU(w21x1+w22x2+b2)
y^=v1h1+v2h2+c,L=(y^−y)2
Its current parameters are:
| w11 | w12 | b1 | w21 | w22 | b2 | v1 | v2 | c |
|---|
| 0.5 | 0.2 | −0.87 | −0.25 | 0.5 | 0.25 | 2 | 1 | −0.5 |
The training example is x1=1, x2=2, with target y=1.5.
Your backward pass reports ∂w11∂L=−3.76.
To check it you use the lesson's nudge-and-compare, nudging in both directions. Run the forward pass once with w11 raised by h and once with it lowered by h, keeping every other parameter fixed, and compute the central-difference estimate
2hL(w11+h)−L(w11−h)
You pick h=0.05 so the arithmetic can be done by hand.
What value does this check produce?
Round to 3 decimal places.