Lesson 2 In-Class Discussion ✅

mistook with zero_grad() function. Cheers.

Should we update the learning rate every-time we try to rerun or retrain the model. I have trained my model. I felt, I have to go a couple of cycles further to improve the accuracy. Should I try just running the fit_one_cycle method directly, or should I run the learning rate finder and update the learning rate one more time.

1 Like

How is data.classes different from data.c. Is it just just data.c = len(data.classes).

Possibly you need “sudo add-apt-repository ppa:mc3man/bionic-media” for Ubuntu 18.04

12 hours will start once you connected the kernel. After 12 hr you can connect again but all your compiled code will not work. You have run compile again. What you can do… You can open in different browser with ignito mode with different id and can run multiple model in different browser.

So when i upload a bunch of images into jupyter, i get the following error message while i run verify_images

/home/nbuser/.anaconda3/lib/python3.7/site-packages/PIL/Image.py:930: UserWarning: Palette images with Transparency expressed in bytes should be converted to RGBA images
expressed in bytes should be converted

What does this mean?

1 Like

@jeremy As a Romanian myself I’m very curious about where you got your info about the lack of “not a math person” concept in our culture. Would be great if it would be true but sadly, it’s not. The funny thing is a lot of feedback I got from people in the local community when trying to convince them to study ML/DL was that they didn’t look into it because they were afraid of the math involved :smile: . Fortunately a lot of people did sign up for the course after all !

3 Likes

so I am using crestle. I noticed that the lesson loaded in crestle is not up to date with the video. The entire Cleaning up section (with the FileDeleter etc. ) does not seem to be pulled into the lesson code.
Additionally, when I try to import the fastai.widgets library, it does not seem to find it in Crestle. Is the fastai library loaded there up to date?

How does

losses,idxs = interp.top_losses()  # returns the top losses in the 
top_loss_paths = data.valid_ds.x[idxs]

and the train version of this ‘clean up your dataset by removing noisy examples’. How will the function know which examples are noisy/incorrect and remove them?

That code snippet is just providing you the list images which are among the top losses and widget gives you an interface to delete them by manual inspection.

1 Like

No documenataion on ImageDataBunch.single_from_classes in https://docs.fast.ai/vision.data.html

Did u try the git pull and update that is mentioned in the documentation and still not get the latest notebooks and library?

I got the same problem with some of my images. It appeals that images containerns transparencies are a problem. I managed to weed out mine by going through the images and finding images depicting sort of free-floating products which where designed to be placed on top of a background. I was perhaps lucky, but they turned out to be pretty obvious.

had to update fastai on crestle terminal, it works now.

conda install -c fastai fastai

also needed to pull latest code from the course material.

cd courses/fast-ai/course-v3/
git checkout . #(note: this will wipe out all your existing changes made)
git pull

1 Like

Like this post if you think there should be label writted top of image in deleting widget. It would make a lot easier to delete wrong labels.

3 Likes

I was thinking of the same.

1 Like

! sudo add-apt-repository ppa:mc3man/trusty-media

  • For this line am getting a prompt asking me for password

! sudo apt-get -y update
! sudo apt-get install -y ffmpeg
! 1sudo apt-get install frei0r-plugins

  • For these I get /bin/sh: 1: 1sudo: not found

These are for the animation in matplotlib. Any fix for this?

I upgraded the fastai in Salamander using:
!pip install fastai --upgrade

import fastai
fastai. version

its showing me fastai. version as : ‘1.0.11’ instead of 1.0.18
Even after the upgrade. I am getting the same not found error for download_images ?

Can anyone help resolve the error?

download_images works in colab but colab has other issues related to memory(Bus Error) and it keeps getting 502 bad gateway.

1 Like

Hmm, kinda like fastai -> pytorch as responder -> starlette. Not quite, but something like that.

I have written a brief blog post based on my notes for lesson 2. Do have a look, and suggest if there are some errors/ missing points.

6 Likes