C1W3 Error in gradient descent

Im getting an error, where it says my dj_dw is wrong… but above shows the correct value… I tried modifying my code a few times but it gets worse every time :pinched_fingers:. Any help would be very appreciated

Hi @EdXO ,

If you look carefully, your result for the first element of dj_dw does not match the expected output.
click on the hint and check against your code.

There are two different tests.

Your code passed the one where there are two weight values (the test that is visible in the notebook cell).

But it did not pass the test in compute_gradient_test(). That test uses three weight values.

Hi @EdXO

In addition to what @Kic & @TMosh said I thinks you didn’t use the variables that passes in the function so please make sure you used this variables to make your code generalization