Week 3 exercise 6 cost function

That is not the correct implementation for dZ1. the operation between W2^T and dZ2 is not np.multiply (which is elementwise): it is a dot product or np.dot.

Please see this thread for more information about the notational conventions that Prof Ng uses for the different types of multiplication.