Lesson 2 In-Class Discussion ✅

Do we have to reinstall everytime it changes version? I assume git pull just gets the code not the update of fastai

Might be different on tabular data, but for CNNs nine times out of ten validation error still goes below training error by the end

1 Like

Name: fastai Version: 1.0.18 Summary: fastai makes deep learning with PyTorch faster, more accurate, and easier

can learn.recorder.plot_losses() be explained in a bit more detail? why train_loss is plotted for each iteration whereas val_loss is plotted after each epoch?

Thanks! I wonder if there is anyone who looks at this rigorously…

1 Like

Git pull is just for the nbs/doc/materials. The libraries should be updated with pip or conda.

1 Like

Validation loss is calculated for the entire validation set at the end of every epoch.

How do we know that our images were not used to train resnet. does it matter ?

When I train a learner for 1 epoch and then repeat that step (e.g. train for another epoch in another fit_one_cycle call), is that equivalent to training for 2 epochs right away?

8 Likes

I think your point about 3e-4 being “halfway” between e-5 and e-4 on a log scale is right. I’ve seen this used elsewhere.

3 Likes

What models can be used (proven to work) for large scale Image classification (ResNext,InceptionResNet,WideResNet) except ResNet (more number of parameters) if our dataset exceeds 10M images?

What do you do if there are unbalanced classes in your dataset? Such as 200 teddy bears and 50 grizzlies.

16 Likes

how does ’ Using the FileDeleter widget from fastai.widgets we can prune our top losses, removing photos that don’t belong.’ this prune our dataset knowing what is correct or not?

Suppose that I am building a classifier to detect oranges and apples in an image. Suppose I have 100 images for each of the class. Also I want to predict onjecte which doesn’t have apple or oranges in it and I want to classify it as ‘other’. So does this requires me to get images which belong to other class like mango and other fruits and then train the model. How can I achieve this ?

3 Likes

yes, it is the same.

1 Like

Most of the time you want to oversample the smaller class to balance it out in training, at least I think that’s what the current best recommendation is

for ‘from fastai.widgets import *’ I get ModuleNotFoundError: No module named ‘fastai.widgets’

It’s a manual process. FileDeleter shows you an interface in your notebook where you can look at some images and delete any that you think look incorrect.

3 Likes

That means you need to git pull to get the latest version of the library, or use conda. Instructions here: https://course-v3.fast.ai/update_gcp.html#update-the-fastai-library

1 Like

The question was already asked somewhere on forums. However, I would like to duplicate this issue here if someone else had it:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-440e075cecad> in <module>
----> 1 a = tensor(3.,2); a

TypeError: tensor() takes 1 positional argument but 2 were given

When trying to run cells from SGD notebook. You can solve it with:

a = tensor([3.,2]); a

Probably something with a ​version of pytorch?

4 Likes