According to the formula given in the figure,

I tried to update all six parameters, I got W2, b2 right but W1,b1 wrong, which makes me think that maybe my code on dZ1 is wrong, but I can’t find the wrong place…

My code is: dZ1 =np.dot(dW2.T,dZ2)*(1 - np.power(A1, 2))

while the equation is

Oh my, after I put these two together, it’s easier to find the difference. I think I’d better put more emphasis on the derivation, instead of the result only…

Hello Hu Tianqi,

Please share the traceback of the error that you are receiving at your end.