General course chat

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/data.py 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)
118
119 def get(self, o):

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

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

Here is the schedule for Deep Learning Part 2:

1 Like

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

1 Like

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

3 Likes

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.

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?


Hi @Kornel,

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

NameError Traceback (most recent call last)

in
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

cat version.py

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

import fastai; fastai.__version__ should work just as well

1 Like

Hello,

I’m getting a 404 error when I access https://course-v3.fast.ai/start_gcp.html. I am migrating from AWS, and want to try GCP.

When I tried the url https://course-v3.fast.ai/ I get the message The 3rd edition of course.fast.ai - coming in 2019.

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

thanks.

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?

1 Like

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: course-v3.fast.ai seems to be back up now. Sorry for the trouble

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.


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

AttributeError: module ‘fastai.vision.models’ has no attribute ‘densenet169’

How can I use densenet with fastai for transfer learning

1 Like

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.

2 Likes

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…

1 Like

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.

Will do - I already have the title for my Medium article. If it looks like a duck, and quacks like a duck - it’s Rugby!

1 Like