Exercise 2, error C1_W2_Linear_Regression

I got the error below from exercise 2, please how to I go about it? My code looks ok.

Gradient at initial w, b (zeros): 0.9160700070618554 0.16849123711340203
Using X with shape (4, 1)

AssertionError Traceback (most recent call last)
6 print(‘Gradient at initial w, b (zeros):’, tmp_dj_dw, tmp_dj_db)
----> 8 compute_gradient_test(compute_gradient)

~/work/public_tests.py in compute_gradient_test(target)
50 dj_dw, dj_db = target(x, y, initial_w, initial_b)
51 #assert dj_dw.shape == initial_w.shape, f"Wrong shape for dj_dw. {dj_dw} != {initial_w.shape}"
—> 52 assert dj_db == 0.0, f"Case 1: dj_db is wrong: {dj_db} != 0.0"
53 assert np.allclose(dj_dw, 0), f"Case 1: dj_dw is wrong: {dj_dw} != [[0.0]]"

AssertionError: Case 1: dj_db is wrong: 2.0374999999999996 != 0.0

Hello, @saminu ! Welcome to the community!
Please, could you share your code in DM with me? Do not share here, It’s prohibited. But this error is probably because the calculation of dj_db is wrong.

Hello @saminu. Even tough i’m not a student from Machine Learning Specialization but a student from Deep Learning Specialization, but like Mentor Lukas said, Please share it through the private chat of Mentor Lukas. You could do that by tapping the profile and click the button message, and feel free to share the code. Don’t put the code here because it breaks your Coursera Honor code.

Hello @saminu,

Recheck your implementation of updates to dj_dw and dj_db in the for loop

I taught I was sharing it privately. I have removed it. Thanks

Thank you. I tried all I could, but it’s still not working

Thank you all. It worked now