Lesson 1 In-Class Discussion ✅

For github repo I’m using a 1080ti. In the lesson it’s a V100

3 Likes

In the lesson it is twice as slow. V100 should be at least 1.5x faster than gtx1080ti

Do you suspect that the cpu is the bottleneck? What are the cpu specs?

SSD vs hdd has no role in training I think, right?

1 Like

Anyone facing this error while training --> https://www.evernote.com/l/AQMUf-g95YxE04J4bJ2NTNPhgMzBVdyDgWg
OS: Mac OS and installed using pip

You might want to look at this benchmark thread:

1 Like

Are you using Colab? Check this thread.

1 Like

Hi, @jeremy @rachel
I applied lesson 1 to another fine grain classification problem


And i’m getting pretty high accuracy, but the images come organised in folders where the folder names are aliases of the original names of the species. The original names are specified in a separate text file.
Is there a way to replace the class names in the data bunch with the the real names?

1 Like

Have you been able to find any documentation? I’m struggling to find the docs for “ImageDataBunch” as well.

EDIT: found it… http://docs.fast.ai/vision.data.html#class-imagedatabunch

1 Like

Hi guys, I wrote an article about my experiences learning AI over the summer, please let me know your thoughts.

1 Like

Kofi you might want to share here: :slight_smile:

1 Like

Thanks

I noticed Jeremy sets up random seed in Lesson-1 will this take care of reproducibility for the weight initialization for CNN

Hi kofi. Please don’t tag Jeremy and Rachel unless other people in the forums cannot help you, see Etiquette for Posting to Forums.

Regarding your question, I think the from_func helper function would be useful. Let us know what you learn!

Well noted, thanks.

1 Like

General remark, isn’t it better to, in notebook, import fastai in that way:
import fastai as fs
Than I can type: fs., hit the tab and it give me suggestion?

As you prefer. If you import like suggested in the course (from fastai import * and any application like from fastai.vision import *) you can hit tab at any point in the notebook and get the same suggestions.

2 Likes

One of the way to use fast.ai is git clone fastai repository v1 and add symlink to folder with your notebook pointing to fastai folder

I having this problem with fastai 1.0.13. It work fine with fastai 1.0.6

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-25-07536b5eb84c> in <module>
----> 1 path = untar_data(URLs.MNIST_SAMPLE); path

~/anaconda3/envs/fastai/lib/python3.6/site-packages/fastai/datasets.py in untar_data(url, fname, dest, data)
     83 def untar_data(url:str, fname:PathOrStr=None, dest:PathOrStr=None, data=True):
     84     "Download `url` if doesn't exist to `fname` and un-tgz to folder `dest`"
---> 85     dest = Path(ifnone(dest, _url2path(url)))
     86     if not dest.exists():
     87         fname = download_data(url, fname=fname)

~/anaconda3/envs/fastai/lib/python3.6/site-packages/fastai/datasets.py in _url2path(url, data)
     57 def _expand_path(fpath): return Path(fpath).expanduser()
     58 def _url2name(url): return url.split('/')[-1]
---> 59 def _url2path(url, data=True): return datapath4file(f'{_url2name(url)}') if data else modelpath4file(f'{_url2name(url)}')
     60 def _url2tgz(url): return datapath4file(f'{_url2name(url)}.tgz')
     61 

~/anaconda3/envs/fastai/lib/python3.6/site-packages/fastai/datasets.py in datapath4file(filename)
     70     local_path = URLs.LOCAL_PATH/'data'/filename
     71     if local_path.exists() or local_path.with_suffix('.tgz').exists(): return local_path
---> 72     else: return _expand_path(Config.get_key('data_path'))/filename
     73 
     74 def download_data(url:str, fname:PathOrStr=None):

~/anaconda3/envs/fastai/lib/python3.6/site-packages/fastai/datasets.py in get_key(cls, key)
     36 
     37     @classmethod
---> 38     def get_key(cls, key): return cls.get().get(key, cls.DEFAULT_CONFIG.get(key,None))
     39 
     40     @classmethod

AttributeError: 'NoneType' object has no attribute 'get'

You should use the developer install from the readme instead of this approach - all the same benefits, but more convenient.

4 Likes

Saving learn instance ???
learn.save(‘stage-1’)

For
Total time: 01:13
epoch train loss valid loss error_rate
1 1.174627 0.330782 0.101796 (00:18)
2 0.498293 0.266701 0.084498 (00:18)
3 0.232486 0.211435 0.068530 (00:18)
4 0.307904 0.225669 0.077844 (00:18)

Which weights are saved ?
All?
Last epoch weights?
The best weights?

Thanks

Michal

Deleting config.yml in /.fastai/config.yml solved it.

1 Like