I am trying to install fastai in my windows 10.
My laptop has no GPU, I am using pip in cmd to install fastai.
In pip page(https://pypi.org/project/fastai/ ), they mentioned to install pytroch before installing fastai.
I followed that step,
For pytorch(https://pytorch.org/get-started/locally/ )-
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
Then, For fastai-
pip install fastai
These python packages are installed successfully.
from fastai.vision import *
This statement is imported fastai.vision successfully,
But when I use the ImageDataBunch function,
data = ImageDataBunch.from_folder(path, train=".", valid_pct=0.2, size=512, bs=4, seed=24)
It shows error, NameError: name ‘ImageDataBunch’ is not defined
I do not know what is happening, Could you please help me to solve this error, thanks
1 Like
Kornel
(Kornel Dylski)
August 27, 2020, 2:01pm
2
The same issue as here Getting load_learner not defined
fastai is now in version 2
in version 2 there is no ImageDataBunch anymore, switch back to version 1 or migrate to version 2
1 Like
I am just copying from there notebook only. Why they have written it?
Yes, @Kornel , that is what I done finally, moved to version 1, working now, thanks
DMBS7
(Mounika)
February 10, 2021, 3:36am
5
me too getting the same error. I have changed my fastai version2 to v1 but still getting the error. Can anyone please help me out!
SisengCo
(Ricky Macharm)
April 8, 2021, 5:45am
6
Hello @Kornel . But the book still has the command. I was following the book when this error also popped up on my personal laptop.
Everything worked fine on colab and gradient though.
SisengCo
(Ricky Macharm)
April 8, 2021, 5:49am
7
Welcome @vipulsaklani .
I think there is a problem somewhere. I will try and contact them on the discord channel. If I get an answer I will relay it back here.