Stuck on C1_W3_Logistic_Regression assigment: expected value a little different from mine

I’m desperatly trying to get out of the error I get in the C1_W3_Logistic_Regression assignment. I believe there is a problem in the unit test because the question here is very easy, however I get the error

Wrong output. Expected: 0.5469746792761936 got:0.5393372325035918

However, the regularized cost I get is VERY close to the expected result (0.6618252552483951 rather than 0.6618252552483948). So I can’t understand.

Can you help me unlocking this situation?
This is my implementation that, as said, is really easy:
{mentor edit: code removed}

I found my error, sorry for disturbing

I’ll edit your message to remove your code.
Posting your code is not allowed.

I have the same problem in simple UNQ_C5. My compute_cost_reg function calculates Regularized cost as 0.6618252552483951 while expected outcome is 0.6618252552483948
I tried a few tricks and even copy pasted the solution from hints but to no avail. Is there still hidden trick to make the cost exactly as expected?

Mine does the same thing for the compute_gradient function, I’ve tried tweaking, rephrasing and reformatting my code but nothing seems to work. Both my sigmoid and cost function worked perfectly, and my dj_db value is also correct, but i can’t seem to find the error in my dj_dw calculation. Does anyone have any suggestions


@dtsyganyuk @Jiao_Jiao can you send me your code in a direct message? I’ll take a look and help out

its fine, thanks i figured it out, i made some changes and it passed all the tests, but would not match the expected output. thats why i was confused. Thanks!