General course chat

(Chris Oosthuizen) #342

On fitting / training my models I am addicted to watching the bar move and seeing my loss values drop. Wasting so much time doing it. Thinking of starting a support group for other addicted students if anyone is interested. lol. need help.

(Pramoda Sahu) #343

why it is showing this error?

TypeError Traceback (most recent call last)
in ()
----> 1 data = (TabularList.from_df(df, path=path, cat_names=cat_vars, cont_names=cont_vars, procs=procs)
2 .split_by_idx(valid_idx)
3 .label_from_df(cols=dep_var, label_cls=FloatList, log=True)
4 .databunch())

/usr/local/lib/python3.6/dist-packages/fastai/tabular/ in from_df(cls, df, cat_names, cont_names, procs, **kwargs)
115 def from_df(cls, df:DataFrame, cat_names:OptStrList=None, cont_names:OptStrList=None, procs=None, **kwargs)->‘ItemList’:
116 “Get the list of inputs in the col of path/csv_name.”
–> 117 return cls(items=range(len(df)), cat_names=cat_names, cont_names=cont_names, procs=procs, xtra=df, **kwargs)
119 def get(self, o):

TypeError: object of type ‘method’ has no len()

(Ajay Arasanipalai) #344

Does anyone know when part 2 starts and how to sign up?

(Joseph Catanzarite) #345

Here is the schedule for Deep Learning Part 2:

(Ajay Arasanipalai) #346

Oh, thanks. So since it’s starting only in March, the live signup will probably begin only next year, right?

(Michael) #347

Thanks to everybody who made the fastai course v3 an amazing journey!
Special thanks to Jeremy, Rachel, Sylvain, Stas & Co.! :smiley:

(Lankinen) #348

I’m still not familiar about how to import data using Fastai. I have folder where is all of my images. Then every image have id which is then linked to class in csv. Actually there is multiple classes in csv seperated with space. How I can import that data into my model? Could someone put example to better understand.

And also have someone made Medium or other articles about this. I think after seeing some examples it is easier for me to understand it better.

(Lankinen) #349

Also is there going to be part 2? Should we register there already or is everyone who registered part 1 getting access to the second part?

(Joseph Catanzarite) #350

Hi @Kornel,

If I run getattr(fastai, ‘version’) in a Jupyter notebook, I get:

NameError Traceback (most recent call last)

1 # how to find fastai version number?
----> 2 getattr(fastai, ‘version’)

NameError: name ‘fastai’ is not defined

If I go to the fastai directory and run


all = [‘version’]
version = ‘1.0.38.dev0’

(Sebastian Fleck) #351

import fastai; fastai.__version__ should work just as well

(Michael Woline) #352


I’m getting a 404 error when I access I am migrating from AWS, and want to try GCP.

When I tried the url I get the message The 3rd edition of - coming in 2019.

How can I access the instructions to setup and maintain the GCP environment?


(Deena Blumenkrantz) #353

Has anyone used the command data.use_partial_data where data is an ItemList? If so, would you please share your example?
Is use_partial_data a way of only using a subset of the images you have collected while training?

(Akshay Bhardwaj) #354

I got the same when trying to access the Zeit documentation. @rachel can you please confirm if the site is going to be down for quite a while or is this just a temporary issue? Thanks!

Edit: seems to be back up now. Sorry for the trouble

(Deena Blumenkrantz) #355

During the preparation of a databunch, is there a reason that the fastai library splits data into the train & valid sets before connecting images with class labels?

Wouldn’t it make more sense to put a similar percentage of each class of image into the train and valid datasets?

Has anyone posted a blog where they deal with the problem that could arise if you have one class with many fewer images than other classes? I think Jeremy mentioned that you could make more copies of the images that had low representation. I understand that if each copy is transformed differently that would reduce overfitting.

I wonder what the limits are? E.g. if you have 100 images for most classes and only 10 for another, can neural nets do a good job of identifying new images that match the lowly populated class? This seems like a fun experiment! :smile: Please share if you have blogged on this topic.

(yogesh gurjar) #356

AttributeError Traceback (most recent call last)
in ()
----> 1 arch = models.densenet169

AttributeError: module ‘’ has no attribute ‘densenet169’

How can I use densenet with fastai for transfer learning


Making additional copies and then using augementation works, but is pretty cludgy.

@radek has a way to do this just by manipulating the train.csv in an intelligent manner (the ‘difficult’ thing here for me at least was constructing the validation set without including ‘copied but transformed’ images) in his Humpback Whale kaggle github repo.

Fastai cookbook
(Brian Smith) #358

Has anyone looked at solutions to image classifications where the submitted image is totally off-domain? Classifications will always classify - with some level of confidence (probably not the correct statistical term to apply to the accuracy) but the image might not even be in the right domain. Would a binary classifier of all your classes v general images be a good first step? The following is an example where I’d like to respond with “This doesn’t look like a sports picture - but…”


Have you tried grabbing a sample of non-sports images from, say, imagenet and adding them as another class (not_sports or whatever) to your classifier?

“Other” bucketing like this usually works relatively well with more traditional ML techniques…

(Brian Smith) #360

Thanks @larcat, I was considering that - but with the nature of the pictures and not always having a specific subject I’d wondered if a binary all sports v others might be a better way. I’ll try both approaches.


Please post results! I’m super curious about this problem generally as applies to image classification and I don’t think there’s a pat answer.