C2_W1_Lab01 Cell 5 NameError

Lab files downloaded to local machine (Windows). When I try to run Cell 5 on Jupyter Notebook on my local machine, the captured error appears. Any suggestions to solve this issue?

This can be a difficult thing to achieve, because Coursera provides a static environment for its set of tool, that (almost) never becomes broken due to newer versions of tools.

So, you’re rather in uncharted fix-it-yourself zone with regards to tool installation - you will need to match your local set of tools to what the notebooks expect.

DLAI does not provide support such efforts, because it’s too much of a moving target.

= = = = =

As to your specific error, it appears you might not have imported all of the required assets that are provided with the notebook. You can get those via the “File Download” tool.

You also have to run every cell in the notebook every time you pen it for editing. That’s how the workspace is configured.

= = = = =
Just one other caution:

If you work on a notebook locally, and then attempt to upload it back to Coursera for grading, that almost never works. The metadata inside the notebook (which the grader relies on) has a very high probability of getting mangled by your local set of tools.

Thank you so much for your response! Fully understand that we are left to fix-it-ourselves zone. Was trying to see if anyone might have encountered a similar issue.

Perhaps someone has, and their reply here would be quite welcome.

Hi, your error said that linear_layer is not defined, which means you need to run the previous cell before running that one.

Let me know if that resolves the issue!

You need to run the previous two cells, and it should work.

1 Like

Thank you so much for all the suggestions!
I should have captured this error screen which happened before the original captured screen when I tried to run Cell 5 (Cell 1 to Cell 4 run without errors).

My computer must have got overwhelmed by all the different packages that have installed as much as my mind have got stuck by them. I have a clearer mind now and will try to get the kernel right.

Thanks again for all your responses!