Trying to figure out my error since 3 days now with regular breaks. Am currenting on C1_W3_Logistic_Regression excercise. I implemented my formular correctly on Compute cost because its displaying correct ouput with zero w, b but when l move downward error persist. If anyone can please assist me?

AssertionError Traceback (most recent call last)
in
8
9 # UNIT TESTS
—> 10 compute_cost_test(compute_cost)

~/work/public_tests.py in compute_cost_test(target)
24 b = 0
25 result = target(X, y, w, b)
—> 26 assert np.isclose(result, 2.15510667), f"Wrong output. Expected: {2.15510667} got: {result}"
27
28 X = np.random.randn(4, 3)

Passing a single test case doesn’t guarantee that it will pass all the later test cases unless your code is correct.

In your code, It should be z_wb += z_wb_ij, not z_wj += z_wb_ij because z_wj initializes to 0 at every iteration, so it wouldn’t make sense to add z_wb_ij to it.

Also, please note that posting code here is not allowed.

Hi @Abiton_Padera! Please note that posting your code is not allowed. I deleted it but next time, avoid posting your code. You just need to share your error and if mentors need to see your code, they will ask you to send them privately.