Lesson 1 In-Class Discussion ✅

Hi, I am new to fastai and deep learning. Can someone please help me understand the problem with using a different RegEx in ImageDataBunch.from_name_re.

I have set pat = r’(?:.)/(.).(?:.*)’
But using this re, I am getting the image annotations right. But data.classes is returning incorrect classes - e.g. Abyssinian_1, Abyssinian_2 are being returned as different classes

Please help me understand why pat = r’(?:.)/(.).(?:.)’ works but pat = r’(?:.)/(.).(?:.)’ doesn’t

Hello everyone. I’ve just started trying to learn deep learning here on fast.ai and have been stuck at the very beginning (trying to create an image data set from google) for the past week now. This is my code, with the error I am receiving at the bottom ( and the error is repeated multiple times going further down the notebook).

I was told that my urls are google cache images for deleted websites, but I am using the same code to download the images (
urls=Array.from(document.querySelectorAll(’.rg_i’)).map(el=> el.hasAttribute(‘data-src’)?el.getAttribute(‘data-src’):el.getAttribute(‘data-iurl’));
window.open(‘data:text/csv;charset=utf-8,’ + escape(urls.join(’\n’)));
) as shown in the official walkthrough. Even when filtering my search results to only show images from the last 24 hours, I get all urls with the same encryption. I am completely lost and stuck. Any help would be greatly appreciated. Thank you.

1 Like

Actually, I think I may have figured out what my problem was. My max_pics was equal to 200 and I only have 80 images. Once I changed it to 80 I stopped receiving the error. I am posting this in case anybody runs into the same problem because I couldn’t find this solution anywhere.


In lesson2-download.ipynb it is said that you should not run the imageCleaner method in colab. I would like to let anyone who just started on lesson one that whatever issue was there when the notebook was made, it is no longer there. I run the imageCleaner on colab without any problem. you just need to remember to open another cell and run it maybe every 5 min so that your session does not timeout. for me I had a cell where I kept running a=5 at least every 5 min to keep the session a live.

Can anyone please point out what I am doing wrong in this?

This might be of help

It’s always a good practice to check the forum for your questions as it already might have been answered and would save your time :slight_smile:

Thank you so much for the help!

I had to import the v3 of the course (in the directory in Gratient) and encountered this problem afterwards when saving the model:

It seems the system can’t edit the file system of the v3 course directory, as shown when I tried to add a folder to the directory:

Does anyone know how to import a writable v3 file system or work around this problem?

I figured this out. It was just a strange error that got solved when I rebooted a bunch of programs.

For image classification of dogs and cats in Lesson 1, The filenames present in path_img folder is used to get the labels of the pictures. Then, that is the use of the path_anno folder? What type of annotation information is stored and used? Is it fine to ignore the path_anno folder if the labels are present in the path_img filenames?

@jeremy path.ls() is convenient (as you point out) and discoverable, since it’s simply a method and comes up in tab completion. On the flip side, it builds muscle memory which will fail people whenever they encounter standard path objects or paths represented as strings.

In Jupyter/IPython, there’s an alternative which works with plain paths and strings alike: %ll {path}. It’s also fairly succinct IMHO, though definitely less discoverable, but it’s a good way to get used to variable interpolation in magics (or shell commands, !ls -l {path} works too of course) :slight_smile:


Hello everyone,

I just started this course and just finished lesson 1. Then I wanted to do some practice using lesson 1’s code, but I encountered a little problem and hope I can get an answer here.

So basically I want to what Jeremy did in lesson 1 all over again, but on CIFAR 10 dataset. However, after I downloaded the CIFAR 10 dataset, it only has a test set and a label.txt. There is no training or validation set. I did some search in the forum and found that other people has a training set for CIFAR 10. I just want to know if this is by design and I need to partition the training set and validation set by myself, or there are some errors.

Screenshot of my code and the output:

I just tried on Colab. No problem. Should you check it again?

Here is my Colab notebook Click me


Thank you! I will try again to see if it is different.

Hi I just started this course and I’m working on MNIST data set of recognizing numbers 3 and 7. When I plotted the graph for learning rate, this is what I got. Can someone explain the reason for the curve going backwards?

I Want to know what is the** minimum version **of PyTorch required for this course ?

INFO – I have a GPU with Cuda 10.0 supported , so i can only download torch 1.2.0 and torchvision 0.4.0 with GPU support.

I want to know is 1.2.0 sufficient?

I do not know how to ask question. Why I cost 30mins when I run fit_one_cycle…

which platform are you using? it sounds like you’re not using GPU.

if you’re using Google Colab you have to switch it on for each notebook (Runtime->Change Runtime Type->Hardware Accelerator->GPU). For other platforms I’m not sure, check the Server Setup section at https://course.fast.ai/

When I check source code, github.com refused to connect. Why?

Why should we use gradient or other other servers?
i have nvidia GPU in my lap , should i go for one? or should i get one server ?
im already using jupyter with minconda .
help me out