W3_E5: AssertionError: public_tests,py (Line 133) file is not accessible

Hello Everyone,
I am trying implementing E5.

Sample option: cost = -1 * np.sum(logprobs)

Error- Output (attached picture);
cost = 0.6926858869721941


AssertionError Traceback (most recent call last)
in
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

Issue: A I do not have access to Python file ~/work/release/W3A1/public_tests.py
Query: Is there any way the user could look into public_tests.py file to triage the issue.

Please assist.
Sincerely,
A

Hi @Anurag_Dixit ,

Your code has only implemented part of the equation for calculating logprobs .
Please check the equation carefully.

You can access all the supporting files by opening the file directory, so from the menu bar at the top of your notebook, click:
file → open->public-tests.py

Hi @Anurag_Dixit,

A similar query was posted, and as @Kic mentioned, you have only implemented part of the equation.

Please look at the link I shared for the details.

Best,
Mubsi

Thanks Kic, Mubsi for the clarification about complete matehmatical equation. It worked.
Sincerely,
A