DLS Course 1 Week 2 Exercise 5 - propogate "dw" is wrong

{moderator edit - solution code removed}

I am getting an error as the ‘dw’ value is wrong. Please help me.

It looks like you have an old version of that notebook. Here’s what that test cell looks like in my Week 2 notebook:

w =  np.array([[1.], [2]])
b = 1.5
X = np.array([[1., -2., -1.], [3., 0.5, -3.2]])
Y = np.array([[1, 1, 0]])
grads, cost = propagate(w, b, X, Y)

assert type(grads["dw"]) == np.ndarray
assert grads["dw"].shape == (2, 1)
assert type(grads["db"]) == np.float64


print ("dw = " + str(grads["dw"]))
print ("db = " + str(grads["db"]))
print ("cost = " + str(cost))

propagate_test(propagate)

You can see that it is different. I suggest you start by getting a clean copy of the notebook and then “copy/paste” over your code, which looks correct to me. There is a topic about that on the FAQ Thread. Make sure when you follow those directions that you also delete all the “dot py” files, e.g. public_tests.py, to make sure you have a coherent set of files.

I am getting a similar error, my notebook is new I get the following:

{moderator edit - solution code removed}

That most likely means that you have not run the previous cells in the notebook. That missing routine was imported by the first code cell in the notebook. Or should have been anyway. Try “Cell → Run All Above” and then run the test cell again. Note that you have to do this every time you close and reopen any notebook or do “Kernel → Restart”.

hello moderator,why are removing the code…iam struggling to write this code please help me

Sharing code is not allowed, that is why we removed it. If you are facing any error, please share that full error (not code) with us…

Hi ,I tried a lot …not able to solve particular cost function code,
please suggest ,what i have to do

First, type your error or any other keyword in the search bar to find the similar post. If you find no post that discussed the issue you are facing, then create your own post with proper course, week, and assignment number and share your full error (not code).

hi
from where i can post my doubts in community,
can you tell me the procedure

Please check this guide.