I am getting this
I am getting error in almost all the modules
fastai.vision.all import * is also not working. Can anyone explain what is happening and what to do?
Why am I getting so many name error?
I am getting this
Well first, you do need to follow the from fastai.vision.all import *
, as the only thing you’ve imported here is the name fastai
.
Now given your screenshots it seems you’re using Google Colab. Colab only has fastai v1 by default, so you’ll need to do a pip install fastai -U
. On top of this you may also need to restart the instance for the library to be properly loaded in
Thanks for your reply. It made my life simpler.
Click one Runtime
then Change Runtime Type
and select GPU
Thanks so much!
For new users like me, this is what worked for me in Colab:
!pip install -Uqq fastbook
import fastbook
fastbook.setup_book()
from fastbook import *
!pip install fastai -U
import fastai
from fastai.vision.all import *
The dog vs cat model code worked after inputting those above.