Lesson 1 Discussion ✅

(Rebecca Reilly) #1226

I deleted all the pet data and re-ran the notebook, but even when it downloads from the untar, I get the same error

OSError: cannot identify image file ‘/home/jupyter/.fastai/data/oxford-iiit-pet/images/Birman_141.jpg’

(bryan hennessy) #1228

i had this problem and reducing batch size, etc didnt do anything. finally i saw i had a few notebooks running, not actively training, just running. killing all the other notebooks got rid of the error.
i’m pretty new to jupyter notebooks…

(James Juan Whei Tan) #1229

Is that the only file that’s causing an issue? What if we delete that image, does that solve the problem?


I had a similar issue, not exactly the same.

Maybe try creating a new dir in jupyter that is not prepended with ’ .’ for example: ‘fastai’ instead of ‘.fastai’

Jupyter seems to want to suggest folder creation and does so with a '.'prepended which caused me issues.

(Stas Bekman) #1231


(danny iskandar) #1232

yeah …i made a video of learning rate vs batch size base on that paper …enjoy!

(Rebecca Reilly) #1233

Deleting the image worked, thanks! Very strange I couldn’t find another way to fix it

(danny iskandar) #1234

yeah i made a video read along + trying to explain that paper …that is amazing discovery!

(Joseph Catanzarite) #1235

Hi @reshama

I am working on paperspace gradient, and I have been running a cell with the following commands at the top of every notebook.

#do this at the start of every notebook
#update fastai repo in directory for course_v3
!pip install --upgrade pip
!cd /notebooks/course-v3
!git pull
!pip install fastai --upgrade

I don’t know if this will cause problems down the road, but so far, so good. In fact, when upgrade pip first, I don’t get the spacy error that comes up if I don’t.

(Mayank) #1236

I have a test csv file without labels, I’m unable to load the data for that and make predictions.

(ritika) #1237

I am facing the same issue while running the lesson3-camvid.ipynb file.
I also tried by adding padding_mode=‘zeros’,num_workers=0 in databunch but it does not solve the problem.

data = (src.datasets(SegmentationDataset, classes=codes)
.transform(get_transforms(), size=size, tfm_y=True)

Please suggest how to fix this issue


(Gianluca) #1238

In my case, the issue was that I didn’t have installed pytorch v1.

(ritika) #1239

Thanks for your suggestion.I have already installed pytorch v1. Still i am facing the issue.


(Haider Alwasiti) #1240

It seems Keras default input size for resnet50 is 224x224 so maybe resnet50 was trained on that size?

But I agree there is no harm in trying 299x299 and it seems usually it will give better results.

299x299 size defaults in keras are for:

  • InceptionResNetV2
  • InceptionV3
  • Xception

224x224 defaults for all other models in keras:

  • VGG16
  • VGG19
  • ResNet50
  • MobileNet
  • DenseNet
  • NASNet
  • MobileNetV2

(Vishal Pandey) #1241

Hey Guys… I am getting this error while running Lesson 1 on my dataset. Can someone tell me how to correct it. Thanks in advance :slight_smile:
AttributeError: module ‘PIL.Image’ has no attribute ‘register_decoder’

(Jithin James) #1242

Here are some of the questions I have on image classification task.

Suppose we have a label set that has more than two levels of classification?

For example, labels.csv will look something like:

img, cat_1, cat_2

  1. img_a, 1, 11
  2. img_b, 1, 12
  3. img_c, 2, 21
  4. img_d, 2, 24
  5. img_e, 1, 13

As shown above, here we have two categories for cat_1 column and more than two(>2) categories for cat_2 column.

  • One approach was using label_col attribute when we create Databunch. See here: https://docs.fast.ai/vision.data.html#ImageDataBunch.from_csv. And perform the classifications separately. Is it the right approach?

  • Also, what fn_col attribute does in above call? i couldn’t find an example for that.

  • When image sizes range(100x100…400x400) differ in the training set, how do we resize and perform the classification? Will rand_resize_crop work in these cases?

(Dinesh) #1243

Hi, I have created GCP instance for FastAI course

However when trying to access notebooks from browser using http://localhost:8080/tree, I am getting following error

Any pointer what wrong I am doing ?

(Jithin James) #1244

@dinesh.chauhan You are trying to connect to the localhost, which is your local machine. On your machine, there’s no server listening for connections, hence, connection refused.

To connect to your GCP instance, there must be a public url available, something that’s not localhost.

Please check out this forum or post the question there: https://forums.fast.ai/t/platform-gcp/27375

(Dinesh) #1245

Thanks @jithinrocs . That page seems to be private. Is there way to subscribe to that forum ?

(Alison Davey) #1246

The command that you type in the terminal

gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME -- -L 8080:localhost:8080

needs to include your ZONE and your INSTANCE_NAME. You can see these on your GCP Compute Engine page. The guide https://course-v3.fast.ai/start_gcp.html goes through all the steps.