Course2 _week1_Initialization_baclward prop

In model defination it is written
# Backward propagation.
grads = backward_propagation(X, Y, cache)

But in course 1 for grads function instead of X we used AL(output of forward prop).
Is it right to write X, or it should be a3?

Hi, @Lilit.Ghalachyan.

a3 is already passed inside cache:

cache = (z1, a1, W1, b1, z2, a2, W2, b2, z3, a3, W3, b3)

And you also need X to compute dW1.

Let me know if it is clear now :slight_smile:

yes it is clear, thank you @nramon

1 Like