General course chat

(Andrew Ayres) #449

I’m aware, from doing Part1 in person, that some used student accommodation to say in SF. For example, offer both private and shared rooms and their 2018 rates, when I enquired in early October 2018, were;

USA Student Residences
711 Post St
2018 rates

              Room Type                               Monthly              

Private Room/ Private Bath $1,975
Private Room/ Shared Bath $1,700
Shared Room/ Private Bath $1,275
Shared Room/ Shared Bath $1,000

When I enquired, the private rooms with private bath were all booked up, so I think it’s best to plan well ahead.

Others I knew who stayed in SF either lived there, or knew someone they could stay with. I did search for a good value accommodation in SF, but I found that it can take just as long, or longer, to take public transport across the city as it does to arrive into Embarcadero from the East Bay.

I found that AirBnb prices dropped dramatically if I travelled 30-55mins by BART. I found the BART system brilliant, and a very easy way to get to Howard St. when you get off at Embarcadero. I stayed in various AirBnbs (e.g. Pittsburgh/BayPoint (c.53mins direct to/from Embarcadero), South Hayward (c.36mins away direct) and Lafayette (c.31mins direct trains). Of these, Lafayette was the most pleasant area by far, but also the most expensive of the three. I can give you more info if you want to DM me, although I’m aware there are many places to stay, and my experience is just one small slice of what’s available.

I can understand why you want to stay in SF, and I hope you find something good.

(Rick N) #450

Thanks @sgugger! Sorry to be so dense, but - how do I call that script?

(Imran Noor Mohamed) #451

Hi @eilalan

please try adding the exact import statement from fastai.datasets import untar_data

Hope this solves the problem, let me know if that works. I spend some time fiddling around things to make them up and running


It’s called automatically if you have typed the line tools/run-after-git-clone after cloning the repository.


Is there anyone who knows how to combine a text classifier with a tabular classifier?

Let’s say I want to classify something based on a paragraph of text together with a numerical value. How would that be done with the API that was released together with this course?

(Rick N) #454

I’m guessing you’re referring to the course repo? I’d like to run the script on my notebook, just one at a time, before posting it to github. Is there a way to do that? I’ve tried a few things and no luck. Does it have to be called from outside the nb?


You can just execute it with

tools/fastai-nbstripout -d {path_to_notebook}

if you’re in the fastai repo. Or you can copy the script where you need it. It’s all documented here.

(Atte Juvonen) #456

Does this course have assignments? The blog post by Jeremy said “you should plan to spend about 10 hours on assignments for each lesson”, but I can’t find assignments for lessons anywhere.

(Frankline Apiyo) #457
data = ImageDataBunch.from_name_re(path_img, fnames, pat, ds_tfms=get_transforms(), size=224, bs=bs

i don’t get why we pass pat here; like when am i supposed to pass a regex and when should i not? also the same question goes for ds_tfms. and the call to the normalize function at the end. how do i know for what dataset should i call it and for what dataset should i not call it

(Frankline Apiyo) #458

i probably asked this question in the wrong chat. i’m very new here. but fingers crossed, i hope i get help

(Frankline Apiyo) #459

so I cant even find the documentation that can answer these questions and my instincts are telling me to give up

(Brian Smith) #460

ImageDataBunch.from_name_re - the final RE stand for regular expression - so using this this ‘from’ option requires a regex. Others that use folders or a CSV to identify the images would not need a regex - see for the docs.

(Frankline Apiyo) #461


(Brian Smith) #462

You are very welcome - and don’t give up! :slight_smile:

(Sahil KARKHANIS) #463

Hello, I was able to build a model with a good score which can be surely improved looking at the plot_top_losses - by deleting some images which are no where related to the animals. I tried to clean the dataset with fastai.widgets ImageCleaner() but stuck at an error.

TypeError                            Traceback (most recent call last)
 <ipython-input-52-404739740ce3> in <module>
----> 1 ImageCleaner(ds, idxs, path)

/opt/anaconda3/lib/python3.6/site-packages/fastai/widgets/ in __init__(self, dataset, fns_idxs, batch_size, duplicates, start, end)
 92         self._deleted_fns = []
 93         self._skipped = 0
---> 94         self.render()
 96     @classmethod

/opt/anaconda3/lib/python3.6/site-packages/fastai/widgets/ in render(self)
220             self._skipped += 1
221         else:
--> 222             display(self.make_horizontal_box(self.get_widgets(self._duplicates)))
223             display(self.make_button_widget('Next Batch', handler=self.next_batch, style="primary"))

/opt/anaconda3/lib/python3.6/site-packages/fastai/widgets/ in get_widgets(self, duplicates)
180         "Create and format widget set."
181         widgets = []
--> 182         for (img,fp,human_readable_label) in self._all_images[:self._batch_size]:
183             img_widget = self.make_img_widget(img, layout=Layout(height='250px', width='300px'))
184             dropdown = self.make_dropdown_widget(description='', options=self._labels, value=human_readable_label,

TypeError: slice indices must be integers or None or have an __index__ method

Is there something wrong I am doing or something which can be changed here?


Should we work on Part 2 (2018) after we finish Part 1 (2019)?

(NicholasTW) #465

Just wanted to thank everyone on this forum for being so helpful!

(kelvin chan) #466

I noticed Jupyter notebook, the doc as invoked by ?, ?? or shift-tab sort of get in the way of coding sometimes. I used Xcode a lot, it has its own problems, but one thing i like is that the lang and api doc appear on the right margin, and not at the bottom. Not sure about others, I prefer to have a dedicated right margin for doc thats available at all times.

Any one know if there’s a widget to do this? or i have to try suggest this to the jupyter team?

(kelvin chan) #467

Comment about lesson 3 video at 1:33:29 (use 16 bit op)

@jeremy: I also placed this on youtube comment. This is a surprise and not a surprise for me simultaneously.

Surprise: Both google and apple has tools to do model quantization, and they claimed it saved memory at the expense of model accuracy. I don’t know the detail different between quantization and 16-bit floating, i actually thought they r the same thing in essence??

Non-surprise: I have a discussion once with a learner on Andrew Ng course. He was very imaginative and claimed using Double (64 bit) should improve accuracies better. I played the devil advocate claiming this may be wrong. I speculated 16 bit may have a regularization effect.

But since it is not easy to test my idea before, the argument was never settled, not even a single case. Now, I think I can cite your work as first evidence this is true.

What do you think? Did you work on this more since the video?

(kelvin chan) #468

Related to my previous post. I never used the quantization tool. I realized they still trained the model with 32 bit and only “crippled” the model with 16bit to make inference. This contrasts with what you did here where you train and inference both in 16 bit.

If this finding is generalizable, then quantization may not even be needed, if you just do everything in 16bit.