Hi,
I was doing the first week 4 programming exercise (Building your Deep Neural Network: Step by Step) and after completing task/exercise 6 (compute_cost), I ran the cell as well as the cell below for testing. Unfortunately, I got the following error:
NameError: name ‘compute_cost_test_case’ is not defined
I would be very grateful if someone could help me out with this issue.
I’m glad to hear that you figured out the solution under your own power. When you get an undefined error like that, it typically means you have not run the earlier cells in the notebook since that last time it got restarted. The easiest way to get everything back in sync is:
Kernel -> Restart and Clear Output
Save
Cell -> Run All Above
Then try running the cell that “threw” that exception before.
If you have left a tab open on the assignment, it may well have timed out and the runtime state is lost, even though you still see output from the previous runs in the notebook text.