A walk with fastai2 - Vision - Study Group and Online Lectures Megathread

How are you installing the library? @shakur and @Srinivas

I was just running the repository notebook. So I did not make any changes.

1 Like

Hmmmm. I’ll investigate

Same here. I did not change anything in the first notebook. Just followed it.

I’m running it on collab too and it is giving me the same error.
tried running this:


mnist = DataBlock(blocks=(ImageBlock(cls=PILImageBW), CategoryBlock), 
                  get_items=get_image_files, 
                  splitter=GrandparentSplitter(),
                  get_y=parent_label)

dbunch = mnist.databunch(untar_data(URLs.MNIST_TINY))
dbunch.show_batch(max_n=9, figsize=(4,4))

from https://github.com/fastai/fastai2/blob/master/nbs/50_datablock_examples.ipynb and i’m getting the same error

I have a hunch it’s torchvision. Confirming now but they just pushed 0.5.0 today.

Edit yup, that was it. !pip install torchvision===0.4.2

Use this. I will update the notebooks and the colab install directions. @jeremy or @sgugger I’d recommend updating the requirements for fastai2 as well.

For convenience, the function is now:

import os
!pip install -q fastai2 fastcore feather-format kornia pyarrow wandb nbdev fastprogress --upgrade 
!pip install torchvision===0.4.2
!pip install Pillow==6.2.1
os._exit(00)

I’ll edit the course nb’s tommorow

5 Likes

@muellerzr Great work, and enjoy it.

Just wondering when will the block 2 materials on tabular stuff be available?

I’ll be working on them Incrementally (in between school and whatnot). In the meantime I’ll put the old tabular and NLP notebooks back up for people to look at. At the absolute latest mid/late February.

THANKS for the quick update. Works for me now.
When I run the pip install commands and when it does the Pillow install I see the following error:
ERROR: albumentations 0.1.12 has requirement imgaug<0.2.7,>=0.2.5, but you’ll have imgaug 0.2.9 which is incompatible.
It does go through and install Pillow 6.2.1 after uninstalling 6.2.2
Is that as expected?

Yes. We do not want 6.2.2 (though I removed the —upgrade, I’m unsure on how that behavior works, learning pip package syntax still somewhat :slight_smile: )

ok thx - also will we be using albumentations library to perform data augmentation?

That I’m not 100% sure of. But all augmentation works with this setup :slight_smile:

*as of writing this.

What is the default lr_max for the learner when we call fit_one_cycle?
self.lr if lr_max is None not sure where the self.lr is being set.
During some point in the session can you show us the best way to jump around source code :slight_smile: ?

Yes, if we have time next week I will do so (which we should!) If not then around lesson 6 we’ll get real heavy with the source code navigation. The default is 1e-3

1 Like

Just FYI - at least one issue in your try with resnets code for dbunch:
I got an assertion error using that code. On closer inspection it says
pets = DataBlock(types=(PILImage, Category) vs
Code early on in nb
pets = DataBlock(blocks=(PILImage, Category) vs

I don’t think the regex being different should cause this.
The regex is slightly different - orig code matches .*’ at the end while the
code below uses .jpg$’

When I use the orig code it works…

Not an issue but just FYI

2 Likes

thank you

Just a suggestion mueller…
If we can have a walkthough of some deployment steps and a complete end to end image classification app through any apps like flask or render will complete the task image classification
And also we can update our work we are doing this week will help to enhance knowledge and ideas.

@muellerzr In Lesson 1 part 2 video you’re saying that you overfit the data as the validation loss is lower than the training loss, isn’t that the other way around you actually underfit the training set?, I remember Jeremy saying in one of his lectures that a well-trained model will always have validation loss higher than the training loss, it doesn’t count as overfitting as long as the validation accuracy (metric that you care about) is increasing.

3 Likes

Yes, that is correct. Thank you :slight_smile:

On deployment: I’m afraid I do not have that. We’ll do some deployment work on week 6 however! That being said though, here is the lesson 2 notebook of course-v3 in fastai2, which may assist you: https://github.com/fastai/fastai2/blob/master/nbs/course/lesson2-download.ipynb

1 Like

Nice catch, I’ll fix this later today so they match