General course chat

Weird international licensing issue maybe. That’s annoying. I can confirm it’s available in USA and UK, though. The narration isn’t that bad actually!

Yes, great book, I’m reading it nowadays.

This looks amazing https://twitter.com/RichardSocher/status/1521590973469396993?s=20&t=eUtLLbWDK5B2cGGsWSZdag

4 Likes

RE : Jeremys poll
With respect to all the beginners here, those who have done this course multiple times were beginners once, we were intimidated too, but there is no such thing as a nonsensical question.

6 Likes

Some of Jeremy’s comments from Lesson 3…

[52:57] My very strong opinion is that the vast majority of projects i see in industry
wait far too long before they train their first model. […] You might be surprised that none of the fancy stuff you’re thinking of doing is necessary because you already have a good enough accuracy for what you need beginners

[50:42] The number one mistake of beginners is that they jump to the higher performing architectures from the start of a new project [rather than using] resnet18/34 and asking "Do I need it faster if what I’m doing now could accept some tradeoffs.

…resonated with a few stories I read in the past that I think say something similar:

4 Likes

Random tidbit, came across this while doing some study: if you’re trying to data clean a vision model (lesson 1, 2), following along with the ch-2 production notebook: using

fns = get_image_files(path)

won’t reveal non-image files to your verify_images function later. I haven’t noticed if this affects the learner (I think the dataloaders know to ignore non-images anyway), but if you make a function to convert images to JPEG this’ll cause errors. Instead using:

fns = get_files(path)

will expose everything in path.

This is useful because PIL will complain when your dataloader comes across non-JPEG images (RGBA instead of RGB) when you do your first training. A conversion function:

    for fpath in subdir.iterdir():
        if fpath.suffix != '.jpg':
            im = Image.open(fpath)
            im = im.convert('RGB')
            im.save(str(fpath.parent/fpath.stem)+'.jpg')
            fpath.unlink() // delete original file

will remove this warning later on.

1 Like

Where Lesson 3 at [28:08] says “this is how we set the seed so that each time I run this I gotta get the same random numbers,” makes me remember this example of well commented code from xkcd…
image

2 Likes

Does our fastai output results are reproducible? I am observing that they are not. Any comments on this on how to produce reproducible results??

Where specifically are you finding that the training process is not reproducible?

Are you using the set_seed function?

1 Like

To ensure reproducibility when using fastai, you may want to follow the approach outlined in this fastai forum post. It’s arguably one of the hardest things to get right and therefore can be frustrating as heck :wink:

I’ve been using this approach in my work for some time now. Try it out with a small model and small dataset to get things reproducible and take it from there.

Put set_seed(42,True) at the top of your notebook, and restart the notebook kernel each time you run your notebook, and you should get the same results each time.

2 Likes

This might be a stupid question … but, in what kind of cases/situations would you want to set reproducible=False (the default)?

No I did not. will use now and test it out.

1 Like

I almost never do reproducible notebooks. The main exception is when I’m creating a lesson, and I want to be able to refer to the exact results in prose. So I don’t want them to change.

But otherwise I really like to see the variation that occurs across runs.

5 Likes

set_seed(42,True) is tried and tested - I got the same output. My main motto here is to produce reproducible results. This is for a live hackathon I am participating. Thanks @jeremy @ilovescience

2 Likes

A bit off topic, but still programming related… this was just too awesome not to share
and actually a bit earlier there was a bit on neural networks [up to 22:00].

2 Likes

what are folks (especially beginners) doing after you’ve finished the course?

1 Like
  • working through the book
  • revising lessons trying improve my “Road To The Top” Paddy Kaggle entry
  • hanging about the forums answering questions to practice what I’ve learnt and learn more from being corrected when I’m wrong.
  • looking for opportunites at work to apply ML
2 Likes

Hi Jeremy,

I could install fastbook on M1 chip, error keeps pop up. Let me know your suggestion please! thank you
ImportError: dlopen(/Users/dinglab/mambaforge/lib/python3.9/site-packages/scipy/special/_ufuncs.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/liblapack.3.dylib
Referenced from: /Users/dinglab/mambaforge/lib/python3.9/site-packages/scipy/special/_ufuncs.cpython-39-darwin.so
Reason: tried: ‘/Users/dinglab/mambaforge/lib/python3.9/site-packages/scipy/special/…/…/…/…/liblapack.3.dylib’ (no such file), ‘/Users/dinglab/mambaforge/lib/python3.9/site-packages/scipy/special/…/…/…/…/liblapack.3.dylib’ (no such file), ‘/Users/dinglab/mambaforge/bin/…/lib/liblapack.3.dylib’ (no such file), ‘/Users/dinglab/mambaforge/bin/…/lib/liblapack.3.dylib’ (no such file), ‘/usr/local/lib/liblapack.3.dylib’ (no such file), ‘/usr/lib/liblapack.3.dylib’ (no such file)