This probably just means that you closed and reopened the notebook. Anytime you do that, you need to re-execute all the previous cells in the notebook. Try āCell ā Run All Aboveā and it should define that function.
NameError Traceback (most recent call last)
<ipython-input-5-a6f364884ebb> in <module>
12 axarr[1].set_title('x_pad')
13 axarr[1].imshow(x_pad[0, :, :, 0])
---> 14 zero_pad_test(zero_pad)
~/work/release/W1A1/public_tests.py in zero_pad_test(target)
7 np.random.seed(1)
8 x = np.random.randn(4, 3, 3, 2)
----> 9 x_pad = zero_pad(x, 3)
10 print ("x.shape =\n", x.shape)
11 print ("x_pad.shape =\n", x_pad.shape)
NameError: name 'zero_pad' is not defined
And the fact that it failed to call zero_pad inside zero_pad_test but not failed to call the same function inside notebook seems like an error in zero_pad_test.
I tired Hohlweger_Bernhardās solution, and it works locally. However, online grader still grade with public__tests.py that has error. So, the resulting score still not be able to pass the assignment.