W2_A2_Ex-5_Calculating the value of dw and db using np.dot/np.sum

If you use np.dot, you shouldn’t need the np.sum. Well, unless you did the transposes in the wrong way. Please have a look at this thread and see if it is relevant to your issue.

Here’s another thread which starts from the cost formula and discusses several ways to code it.

BTW the mentors can’t directly look at anyone’s code, but there are ways we can share code privately if that is necessary. Let’s see if the thread linked above sheds any light. If not, we’ll go to the next step.