# [Week 3 Exercise 8 Wrong Value of W1], Please help

Thank you for your detailed response!
I found the mistyping of the random function, now it works fine. And all my assignment is working now, yet i have a question.
You mentioned before, not to ignore any test failures.
I have a failure during the cost function calculations after implementing the suggested equations

logprobs = np.multiply(np.log(A2),Y)
cost = - np.sum(logprobs)

The test of the section gives an error, regarding to my cost function value.

cost = 0.6926858869721941
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-156-9523b300d7a7> in <module>
      3 print("cost = " + str(compute_cost(A2, t_Y)))
      4 
----> 5 compute_cost_test(compute_cost)

~/work/release/W3A1/public_tests.py in compute_cost_test(target)
    131 
    132     assert type(output_1) == float, "Wrong type. Float expected"
--> 133     assert np.isclose(output_1, expected_output_1), f"Wrong value. Expected: {expected_output_1} got: {output_1}"
    134 
    135     assert type(output_2) == float, "Wrong type. Float expected"

AssertionError: Wrong value. Expected: 0.5447066599017815 got: 1.0493608309109266

Expected output

cost = 0.6930587610394646
All tests passed!
 All tests passed.

Regarding to the compute_cost_test my value is not acceptable, but the text below show different value. Are there still any problems with function implementation?

Regards