Error in compute_gradient_reg() in #UNQ_C6

Hi I am facing an error in assignment for writing compute_gradient_reg() due to which I am not able to submit my assignment. Can someone please help.

Here is my code:

{moderator edit: code removed - not allowed}

Here is the error in running the next piece of code:

dj_db: 0.07138288792343662
First few elements of regularized dj_dw:
[-0.016490325478866537, 0.004020375817930151, 0.04928960705289054, -0.002478046591213124]

AssertionError Traceback (most recent call last)
—> 13 compute_gradient_reg_test(compute_gradient_reg)

~/work/ in compute_gradient_reg_test(target)
124 assert np.isclose(dj_db, expected1[0]), f"Wrong dj_db. Expected: {expected1[0]} got: {dj_db}"
→ 125 assert np.allclose(dj_dw, expected1[1]), f"Wrong dj_dw. Expected: {expected1[1]} got: {dj_dw}"

AssertionError: Wrong dj_dw. Expected: [ 0.19530838 -0.00632206 0.19687367 0.15741161 0.02791437] got: [0.17605853 0.0063724 0.20837406 0.17669482 0.0195065 ]

This has been resolved. I realised my mistake in code and have fixed it to:

{moderator edit: code removed}

I’m glad you fixed the issue.

Please do not post your code on the forum. That’s not allowed by the community standards. I have edited your messages to remove the code.

Duly noted. I will be careful henceforth.

Hello Everyone
Even I’m getting the same error.
Please help