Week 3 Exercise 6 (backward propagation)

Note that * and np.multiply are both the same operation, which is “elementwise” multiply. The expression for dW1 involves two different operations: It is a dot product between W^{[2]T} and dZ^{[2]} followed by an elementwise multiply between the first result and g^{[1]'}(Z^{[1]}).

It might help to take a look at this thread to understand more about the notational conventions that Prof Ng uses for dot product and elementwise multiply.

It might also help to actually see the value that you get for dW1 with your code. Maybe there would be a clue there. One common error on this particular line of code is to use dW^{[2]} instead of W^{[2]} in the dot product.

1 Like