Course2 - Week1 -Ex2 - Dataset Loading error?

Hi ,
Looks like there is some problem with loading load_2D_dataset()

NameError Traceback (most recent call last)
in
----> 1 train_X.shape

NameError: name ‘train_X’ is not defined

It seemed fine a couple of hours back or so… but am getting this error now,
The code to load the dataset is already present in the exercise (i.e. not my written code). Please help.

Try restart kernel and run all cells.

1 Like

Exactly. The point is that if you had the notebook open for several hours, the kernel timed out and needed to be restarted. Anytime that happens, you lose all the “runtime state”. You need to rerun all the previous cells to recreate that state.

Thank you @gautamaltman and @paulinpaloalto for responding and helping.
I tried the restart of the kernel, but for some reason it didn’t work. I went ahead, renamed the file, and requested a new assignment notebook, and was able to proceed smoothly from there. thanks again.

Glad to hear that you were able to find a solution! Thanks for confirming.