C1 W3 assignment exercise 6 question


I am trying to solve exercise 6 in the assignment ( complete the compute_gradient_reg function below)
If I put this in the first cell:

I get the error: TypeError: compute_gradient() missing 1 required positional argument: ‘lambda_’

So, I put lambda_ in the end to fix the error and,
If I put this:

I get the error: Wrong dj_dw. Expected: [ 0.19530838 -0.00632206 0.19687367 0.15741161 0.02791437] got: [ 0.21851331 -0.01506144 0.18932835 0.14208348 0.04027734]

How can I get out of this loop of errors? I really need to finish this…

Hi @igobydamien,

Please do not post code in the forums.

Please keep in mind that you have to write your code between these two lines only and not make any changes outside of them or to any other cells.



You are failing the test case due to incorrect 'dj_dw' values. Please refer to the hints provided in the lab notebook.



I checked out the hints. It still doesn’t work. If your advice is to just check out the hint, what is the community for? why is it keep telling me to add lambda_ in the dj_db, dj_dw = compute_gradient(X, y, w, b) code?

I solved it by myself. Thanks for the big help