week4_Exercise 9 - L_model_backward

Hi, I’m frustrated by this. All the exercises before this one are correct. What is the problem here?

This error means you did not set ‘dA0’.

In each layer, say “l”, we calculate dW^{[l]},db^{[l]}, and dA^{[l-1]}. Since dA is an input to a previous layer, its superscript is [l-1]. You can also see 6 print statements in the test. In the 2nd layer, dW2, db2 and dA1 are calculated. In the 1st layer, dW1, db1 and dA0 are calculated.

Please double check how you set the number of each variable to store into a “grads” dictionary.

1 Like