Lesson 2: getting error with creating ImageDataBunch from_folder

I use Google Colab and have the same error. Adding this in the begining fix the problem for me, thank you.

1 Like

Best Reply, thank you

1 Like

i am using kaggle kernel. what can i do in kaggle or in colab?

FWIW, your code only “fixes” it because you’ve stopped passing the transforms to ImageDataBunch.from_name_re. I suspect that if you start passing it again, you’ll still get the error.

data = ImageDataBunch.from_name_re(
    ds_tfms=ds_tfms,  # <------

Admittedly, I have no idea what transforms are returned from get_transforms() or what they do but I’m guessing they’re important enough that you don’t want to leave them out.

You Sir, are a star!! Thank you.
My Colab training now uses image augmentation - yaaaaay!
Thank you very much.

Is this because there is a change in fastai repo?

https://anaconda.org/pytorch/pytorch had a new release on 2020-04-22 that was impacting me because I was just taking the latest version.

I am sure once the new version of fastai is out the requirement of using PyTorch 1.4.0 will be no longer needed.

1 Like

there are no torch==1.4 version

no torch==1.4

You may need to add the ‘0’ at the end.

For example:
pip install torch==1.0.0 torchvision==0.2.1

I have never used the Kaggle or Colab systems.

I use g4n.xlarge instances from AWS on spot pricing for $0.1588 an hour and only run them for when I’m working on the model.

All other time I spend on my localhost with writing code and collecting datasets.

how much it cost you(average) for a month?

I’m spending about USD $10 or so a month.

I spend about 5 hours each time I spin an instance and do this 2-3 times a week.

So about 15 hours a week, and than data transfer and what not, gets me to about that USD $10.

I also use S3 for backups of my computers so there’s a bunch of that in there as well.

Looking up my current bill for May 2020 here are my details:
g4dn.xlarge Linux/UNIX Spot Instance-hour in US East (N. Virginia) in VPC Zone #7 - 33.591 Hrs - $5.30

There is also some EBS but it’s less than a dollar.

Still the same error of
ERROR: No matching distribution found for torch==1.4.0

not exactly sure besides doing a full OS update and making sure you are on the latest versions of pip and python.

Also it would seem that if you can find the download location for the 1.4.0 you can install from the download.