Lesson 1 In-Class Discussion ✅

Somebody suggest me a way to practise.

thank you. I applied the changes listed here:

now I get this

doc(interp.plot_top_losses)

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-19-a7fe6964f6f7> in <module>
----> 1 doc(interp.plot_top_losses)

NameError: name 'doc' is not defined

I have a problem, the link from 21:52 minute of video: https://s3.amazonaws.com/fast-ai-imageclas/oxford-iiit-pet
Doesn’t seem to work. I receive an error and when i paste it to the browser I get error: NoSuchKey and they key is oxford-iiit-pet

show_batch for me takes a long time to run as well, i am using google colab. are you using google colab and did you ever figure out how to speed it up?

I’m looking at the source code for show_batch https://github.com/fastai/fastai/blob/master/fastai/basic_data.py#L183 and don’t see where it takes figsize as an input param. can someone explain?

Need help here for getting predictions. I join a kaggle competition on image analysis and went through all the steps from lesson 1. Now I have a problem of getting predictions of the test set and exporting into a csv file to submit to kaggle,

My ImageDataBunch current has 3 datasets. A training dataset, a validation set (20% of training), and a test set provided by kaggle.

Please advice. thanks

As I understand from the lecture - it is a matter of experimentation. You are correct that the possible rule is

select the max learning rate as the LR right before the reporter plot starts showing gain in loss as we keep on increasing the LR. The minimum can then be chosen as 10x or 100x smaller than max.

But you also should try different slices near that one and check whether they lead to a better result.

1 Like

It’s in the 'magic **kwargs** argument, that is then being passed as another **kwargs to show_xys, which accepts the figsize. The fastai library uses these **kwargs quite a lot. Here’s more info:
http://book.pythontips.com/en/latest/args_and_kwargs.html

1 Like

you can either continue on the course, where we deal with predictions, or you can check inside kaggle competition current kernels that were submitted. search ones with fast keyword and you will have dozen submitted with fast.ai library. Fork the notebooks and learn from them.

How to use the model built, to predict the test dataset?

I responded here with a reasonable way to do it. If you already have a test set within your data bunch skip the steps that add a test set to it and run the predictions. You will have to take an argmax from the logits.

Hi everyone, im new here. i have some background on on DL but all on tf, keras i see the first lesson and im really interesting on complete all the course. wich material u recommend to read to be up to date with fastai lib and Pytorch? only docs will be ok?

In another hand, any chance to be online assistant of part 2 of the course?

Kindle regards,

Manuel

thank you.

Hi,
I am reading train and test imagelists from pandas.dataframe and loading it into a databunch.
But, I want to get the dataset object for train and test sets. How can I do that?

code :

test_imagelist=ImageList.from_df(test,path=path,folder='test_images',cols='id',suffix='.jpg')
train_imagelist=ImageList.from_df(train,path=path,folder='train_images',cols='id',suffix='.jpg')
src=(train_imagelist.split_by_rand_pct(valid_pct=0.2,seed=42)
      .label_from_df('category_id')
      .add_test(test_imagelist))

data=(src.transform(get_transforms(),size=224)
      .databunch()
      .normalize(imagenet_stats))

I tried calling src.datasets() at every step but always getting errors.
What am I doing wrong?

yes it is working

You chose “1e-6 to 1e-4” in which the losses are between 4.00 to 4.25 and the variation is not much.i.e. losses seems to be unaffected by the learning rate in that range.
And when you use “1e-1” the losses rise exponentially from there.
Try using the optimum value “1e-02”
Hope it helps

Hi,
The slides are not available directly as .ppt format but you can find the slide screenshots on the following links:


Hi , when I log to the machine in for fast AI template, I should see a data directory among other directory (anaconda3 data downloads fastai), I do not see it, I don`t know why? looking for your help. Thank you

Hi all, new to DL here. I got some decent results from comparing 2 cat breeds, but unfreezing made everything worse. The lecture said to try and look at the plot and pick a low loss point so we can increase accuracy. My chart looks a bit different from the other ones I’ve seen after running learn.recorder.plot(). Can someone help me figure out how to get better results after unfreezing? Also, the lines aren’t the clearest, so is it okay to just eyeball where that dip is on my chart?

Hello,

I’ve just finished week #1.
One question: Can we use single label for classification, in a boolean sense? Like in category or not in category?

What I’m trying to do as practice is to train a model with images of a single city and when given an image as an input, it should tell if the image is that city’s or not.

Thanks.