NameError: name 'learn' is not defined

Hello,

I am getting below error while executing one of the cells in 01_intro.ipynb
Can someone please help me on this.
I did check in stack, but couldnt get enough information

image

1 Like

Did you run previous cells which define learn?
You have to train your model before using learn.predict()

2 Likes

If you have defined learn earlier, than its probably a preemption error. Simply restart your notebook, and run all the cells. That should work

1 Like

yeah! it was running for longer time, I just skipped it! Anyways, Thank you so much for taking your time to reply!

By the way, How long the earlier code is taking for you to run? For me, it is more than 30 mins to run.

It should only takes a 1-2 mins. Which platform are you using? Make sure the code is running on a GPU.

Ah! I dont know that! Iā€™m using Colab, After changing runtime to GPU, it ran in 1-2 Mins.