Exercise 4 - initialize with zeros name 'initialize_with_zeros_test' is not defined

Week 2, Exercise 4 - Initializing Parameters

I have initialized w and b as zeros. But, I am getting this error

Can you help me resolve it? Should I share my code for your better understanding?

Hi @Sarvesh_Chandak, the expected values for w and b seems fine. Did you use shift+enter while running the cells? Thanks.

I am facing the same error, I ran all previous cells and still getting the same error.

You can try restarting the Jupyter Kernal with the option from the menu bar and then rerun all the cells.

Also tried it but didn’t work

I think the function name should be initialize_with_zeros_test_1(initialize_with_zeros) in line 8

@Ahmad_Hammoudeh, kindly share the traceback you are getting. Thanks.

Hi @Sarvesh_Chandak, were you able to solve the issue?

1 Like

Yes, I used shift+enter for running the cells. I also restarted the kernel multiple times, but it is throwing the same error every time.

But, we cannot edit the the line 8. It’s a pre-written line.

It’s exactly the same as the image above.
I tried to submit the assignment and got 100/100 without any errors in the grader output.

1 Like

The problem is that the course staff just published a new version of this notebook and the public tests file that goes with it. There are now two tests for the initialize routine. If you are getting the message that initialize_with_zeros_test is undefined, it means you are running the old notebook, but with the new tests file.

Follow the directions on the FAQ Thread to get a new clean copy of the notebook and then carefully “copy/paste” over any of your completed work from your current copy of the notebook to the new one. Note that it’s not a good idea to try to copy the revised test cell from the new version back to your old version to save yourself work: the problem is that there is hidden “metadata” associated with that cell that you won’t be able to copy. And the cell is not editable in any case, right?

1 Like

Thank you so much. This solves my problem.