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)
in
11
12 # UNIT TESTS
—> 13 compute_gradient_reg_test(compute_gradient_reg)
~/work/public_tests.py in compute_gradient_reg_test(target)
123
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}"
126
127
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 ]
