Lesson 2 In-Class Discussion ✅

As Andrew Ng has said, it is like worrying about over population on Mars.

I removed that one since it’s not the approach we recommend.

1 Like

Please read the etiquette guide in the FAQ.

I’m facing the same issue and agree that replacing valid_ds with train_ds is not ok. Looking at the code of the ClassificationInterpretation class, it seems that it only works with the validation set. I guess would be great that it would receive a parameter to select the dataset.

1 Like

This may help.


You will get lower error when using higher res images.


That’s OK. Autoencoders are too noisy anyway, which means the NN learns the quirks of the autoencoder, rather than what really makes an image a member of a class.

In the video, Jeremy has explained this very clearly

Thanks I’ll be sure to check it out. I am using the same dataset so this could be really helpful!

@miwojc has kindly shared this Jeremy paper on another forum. It may help.

1 Like

Sorry. I did not see that you had already shared the same resource. Thanks.

If your training dataset images are of PNG format, they need to be converted to JPG.

This should work:

import PIL
for fn in PATH.glob('*/*.jpg'):
    im = PIL.Image.open(fn)
    if im.mode != 'RGB': im.convert('RGB').save(fn)

This may help.

1 Like


As much as you can realistically collect. Fastai has been remarkably powerful even with a few data samples. As long as the images are of real world objects which are not very different from the images used to train Imagenet. Hope this helps.

Fastai has been known to work well even with a few images. See the previous answer to @whatrocks similar question.

I was trying download_images for some pictures and got following errors -

  1. “Error: [content-length]”:
  2. The progress bar used to hang up around 99%.
    Upon checking download_images method and its submethod,i got to know that content-length is being used in download_url for the length. Error might be there. I am investigating into this further meanwhile can anybody explain thee reason behind these error??
    Also download_images works fine with single worker i.e. progress_bar completes 100% . Might be a bug or i might be doing something wrong.

indeed, that would be a lovely addition

@simonw asked the question before I got to that in the video FYI.

Having said that, please be sure that your answers are helpful to the person asking the question. i.e. instead of just saying “it’s in the video”, try providing a link to the relevant time-stamp, or just answer the question yourself.