W4 programming assignment error: NameError: name 'linear_backward_test_case' is not defined

After executing
def linear_backward(dZ, cache):

I receive the following error:
NameError Traceback (most recent call last)
in
----> 1 t_dZ, t_linear_cache = linear_backward_test_case()
2 t_dA_prev, t_dW, t_db = linear_backward(t_dZ, t_linear_cache)
3
4 print("dA_prev: " + str(t_dA_prev))
5 print("dW: " + str(t_dW))

NameError: name ‘linear_backward_test_case’ is not defined

I presume that these functions are predefined in a module that’s being imported. I ran all of the preceding code blocks. Any guidance would be appreciated.

1 Like

I ran the function a few more times and it started working.

2 Likes

Whenever you open a notebook, you have to run all of the cells starting from the top. That’s where all the assets are imported.

1 Like