Possible mistake in public_tests.py for propagate() testing

The function call of propagate() in jupyter exercise notebook uses [[1, 1, 0]] for the value of Y, where as the propagate_test() in public_tests.py uses [[1, 0, 1]] for the same.

I think because of this I’m getting the following error,

AssertionError: Wrong values for grads['dw']. [[-0.00154399]
 [-0.00492761]] != [[0.99845601]
 [2.39507239]]

The correct value of dw as shown in the notebook is,

Expected output

dw = [[0.99845601]
 [2.39507239]]

Can anyone please say am I correct or I have misunderstood something here?

1 Like

In my notebook version this propagate_test is already fixed to use the same value, but seems that it checks our outputs against wrong values, derived with input [1,0,1].
So, there is still a bug in this function, but in a different place now

Yes, It’s checking against [1, 0, 1] but calculating against [1, 1, 0] in the notebook.

Hi, I don’t see that in the public_tests.py, I don’t know if these files have been recently updated but I see the right same values in both the notebook and the corresponding tests.

def propagate_test(target):
    w, b, X, Y = np.array([[1.], [2.]]), 2., np.array([[1., 2., -1.], [3., 4., -3.2]]), np.array([[1, 1, 0]])

Hi, it seems there was a bug there check the following thread.

OK, they must have fixed the error. Nevertheless, I finished the assignment. Thank you.

Thank you for replying me back. I have tried to complete my DLS week 2 course 1 assignment today, but now also the error has not been fixed in my notebook. It is showing similar error. All the previous tasks are pass but model function is not running till now also…
please help me out… the deadline for submission of the assignment is near… Thank you

Test cases are compatible with the updated notebook. Make sure you are using the updated notebook, I was making a similar mistake.