While running the Tutorial Beginner Vision getting a NameError

NameError: name ‘ImageDataLoaders’ is not defined

That looks like Colab, I’m guessing you left your notebook idle for too long and it disconnected from the runtime.

Run it again from the top as if you’ve just opened the notebook.

I did but still the error arises.

which notebook name is that?

Google Colab

no, which lesson file? lesson1-pets.ipynb, lesson2-download.ipynb etc?

Its from cats and dogs https://dev.fast.ai/tutorial.vision#Cats-vs-dogs

Do you realise that’s from the development version of fastai 2 which isn’t released yet?

If you’re just trying to do the course then you need to go to https://course.fast.ai/ and start there.

If you actually want fastai 2 then you need to clone the dev repos and ask for help in the v2 forum. (If you’re not sure which one you want then you want v1).

I agree with @joedockrill, that version is fastai2, the newest one coming out, and I believe you have fastaiv1 installed and are wanting to use that. If you mean v1, use the links he recommended.

ohh i am unsure about it sir, i just finished lesson1-image classification and was trying to replicate the work in different dataset. I was searching for some relevant dataset then i got this tutorial i followed along reading docs. My version is 1.6 kinda. Where will be tutorials for v1 ? I am new to this and some stuffs feel confusing i made a switch from Tensorflow to fastai lately.

So it means the docs which i was referring to was v2 ?

Yea sir thanks for yourself figured it out. Thanks for your time!!

Yes. V1’s docs live at docs.fast.ai

Yea sir got it thanks alot! I got another doubt does the loading in the data is different for different datasets ? I mean i am facing difficulties in loading in the dataset from another source and splitting them into train and test. Could ya help me with this ? whats the optimal way and which API is mostly used in getting the data ready

yes and to make it more confusing, there is v1 v2 and v3 of the course which uses v1 of the fastai library. v4 of the course comes out soon (which i think may use v2 of the library??)

fastai has a bunch of factory methods which work a lot of the time but also has a nice flexible datablock api which means you can plug different bits together as you need to.

data will be different from different places but they teach you how to deal with that. i’d recommend just getting on with the course tbh, they’ll show you different ways to deal with different data formats, different ways of splitting it, different ways of extracting label data etc.

1 Like