I keep getting an NameError -- the NameError: name 'x_train' is not defined

I can’t figure out what I am doing wrong – I am new to python – was there a naming code that I am missing?


x_train is defined in the second code cell of the lab.

It should look like this:

# load the dataset
x_train, y_train = load_data()

Also remember when working in the Coursera environment the Jupyter notebook will shutdown automatically if you leave it alone for too long or if you close the site. When this happens you need to rerun the previous cells from the beginning before proceeding.