Chit Chat Thread

That was it, thank you!

Some days your learning journey just looks like this:

6 Likes

Please have a look here: Study Group in Austria

There a a couple of DL related Meetups in Vienna, if you want to connect just PM me (next one is about NLP next week).

1 Like

Hi friends, I’m spending most of July in San Francisco (currently I live in Barcelona, Spain, previously I lived 6 years in bay area SF/PaloAlto until 2015, then returned to Europe), would be cool to meet other fast.ai friends in SF in July, is there any fast.ai meetup in San Francisco organized in July or anybody else would like to organize some gathering in SF in July? ciao have great days :wink:

One more trick - autofire, wrapper on fire:

I’m finding the same, VS code seems to work fine in debug mode until you start to go through the fit part then always seems to crash. Pycharm seems much more robust. Haven’t found the cause of the problem yet, is anybody else having problems.

I believe it’s a problem with debugger support for subprocesses: https://github.com/microsoft/ptvsd/issues/943

I agree, found the link later on another post. Using the:

import multiprocessing
multiprocessing.set_start_method('spawn', True)

helps but its still very slow with large datasets. I also tried setting num_workers equal to 1 which helped again. Lets hope a proper solution is developed soon since it really reduces the value of VS Code. I find PyCharm more robust to this

1 Like

Anyone working on creating a dataset for Siamese network based on folder (different categories are saved in separate folders) ? I’m thinking about using ImageList then based on the pathname I will know its category (then create the pair image with 50% in the same class, like Jeremy did in the walkthrough v2). I’m using fastai v1 now and I don’t know how to get the pathname of Image from ImageList. Do I have to inherit a ItemList and create my own ItemList for saving the pathname of Image. Thank you

It seems like I can now create a Siamese List base on ItemList:

class SiameseList(ItemList):
    "`ItemList` suitable for computer vision."
    _bunch,_square_show,_square_show_res = ImageDataBunch,True,True
    def __init__(self, *args, convert_mode='RGB', after_open:Callable=None, **kwargs):
        super().__init__(*args, **kwargs)
        self.convert_mode,self.after_open = convert_mode,after_open
        self.copy_new += ['convert_mode', 'after_open']
        self.c,self.sizes = 3,{}
        self.all_labels =  [path.name for path in self.path.ls()]

    def open(self, fn):
        "Open image in `fn`, subclass and overwrite for custom behavior."
        return open_image(fn, convert_mode=self.convert_mode, after_open=self.after_open)

    def get(self, i):
        fn1 = super().get(i)
        img1 = open_image(fn1)
        label = fn1.parent.name
        if random.random() > 0.5:
            fn2 = random.choice((fn1.parent).ls())
        else:
            otherslabels = self.all_labels.copy()
            otherslabels.remove(label)
            fn2 = random.choice((self.path/random.choice(otherslabels)).ls())
        img2 = open_image(fn2)
        return SiamImage(img1, img2)
    
    @classmethod
    def from_folder(cls, path:PathOrStr='.', extensions:Collection[str]=None, **kwargs)->ItemList:
        "Get the list of files in `path` that have an image suffix. `recurse` determines if we search subfolders."
        extensions = ifnone(extensions, image_extensions)
        return super().from_folder(path=path, extensions=extensions, **kwargs)

Now the problems goes with labeling :smiley: How can I deal with labeling by randomly choosing the same label (50%). Then after each batch, the label will change. I’m reading the library now and it seems like fastai.ai create the fix label of each data. Am I correct ?

[Edit]

Now I’m stay with the trick for below:

    def get(self, i):
        fn1 = super().get(i)
        img1 = open_image(fn1)
        label = fn1.parent.name
        if (int(fn1.stem[-1])) % 2 == 0:
            fn2 = random.choice((fn1.parent).ls())
        else:
            otherslabels = self.all_labels.copy()
            otherslabels.remove(label)
            fn2 = random.choice((self.path/random.choice(otherslabels)).ls())
        img2 = open_image(fn2)
        return SiamImage(img1, img2)

Because the last digit of my filename is quite random, so I choose the similar pair if d is even else different pair.

Hi Nikhil,

I started out with DL1 2018 without realising there is DL1 2019 as well. As you have attended both do you recommend switching to DL1 2019?

Thanks

cc @beecoder

Yes I’d say so, there’ve been a lot of improvements.

2 Likes

I have a couple of things in progress with 1.0. I am putting together a new desktop this week and am planning on starting off with fastai-2.0. Hoping for a easy conversion. Will take notes

1 Like

I am a naive programmer and honestly my mind was blown when Jeremy added the property ‘ndim’ to pytorch tensor :exploding_head:

用了三个月的时间,学到第九课了.通过我不懈的努力和坚持,终于,我的英语水平得到了大幅度提升!哈哈,主要是今天学第九课,太让我受伤了,我觉得要再花上十五个小时,才能把这课内容整明白,还有一些python的用法,都没见过.我太难了 :rofl:

In which lesson “U-net deep dive” is covered?