πŸ“ Deep Learning Lesson 1 Notes


(Poonam Ligade) #23

Yes if using pretrained weights.


(Sarada Lee) #24

Does anyone has a change to look into the create_cnn (extracted from learner.py line 61 below)? Is it appropriated to have a space between if and none?

body = create_body(arch(pretrained), ifnone(cut,meta['cut']))

(Poonam Ligade) #25

No. Because it’s a fastai function in core.py


(Sarada Lee) #26

Thanks a lot. I am still trying to get myself familiar with the new library. :blush:


(Jeremy Howard (Admin)) #27

Probably most important thing for your learning of the code is to ensure you’ve set up your editor to allow you to click on words in your code to jump to their definition and popup their summary. Once you’ve got that working, everything will be far easier! :slight_smile:


(Christian F Jung) #28

Does anyone know a easy way to download these notes?


(Pratik Bhavsar) #29

I like goto functionality in Atom editor.


(Vikas) #30

Pasting my Lesson 1 notes here too, in case the thread is converted into wiki:


(Jeremy Howard (Admin)) #31

It already is a wiki.


(Leo) #32

question in regard to show_batch

What exactly does the method use to be able to center crop the image?

In the lesson is said that it grab the middle bit, but I quite don’t understand what bit stands for in this context…

Thank you!


(Leo) #33

I did a mindmap of Lesson 1

The goal is to create a mindmap of each lesson.

I also did a mindmap on RegEx

Hope it will be helpful to somebody…

Enjoy :slight_smile:


(Maya) #34

@leovcld thanks for these nice mindmaps.Which software / tool did you use for creating these?


(Imran) #35

Xmind Zen, i suppose


(Ravitha Rajalakshmi) #36

Is learn.save stores the best model obtained during training?


(Kumaraguru Sivasankaran) #37

Is there link to guide created by Francisco for creating dataset off Google Images?


(Mahir Muhammed) #38

Watch lesson 2. You can learn how to create dataset from google images in lesson 2


(Kumaraguru Sivasankaran) #39

thanks. I thought that was hw for lesson 1. Got it!


(Joseph) #40

I found the use of slice(start, stop) in the fit_one_cycle method pretty confusing. It seems like the typical use is to define a slice object with integers to index through arrays. So instead of saying x[start:stop:step], you can define a slice object, y=slice(start, stop, step), and then slice into x by passing in y like: x[y].

Here are the docs that helped me decipher how this is used in the fastai library (check out the source code): https://docs.fast.ai/basic_train.html#Learner.lr_range

Essentially, the fastai library uses slice to get access to the parameters in the slice object here, so that if you have a y=slice(start, stop) object, you can easily reference the parameters like y.start and y.stop

Just adding this note here because I spent some time looking up how the slice object is used in python, but didn’t find any comparable examples, so maybe I could save others a few mins.


(Matthew Arthur) #41

I used Lesson 1 to build a classifier for the Arabic Handwritten Characters Dataset and wrote about it here: https://medium.com/@matthewleearthur/deep-learning-handwritten-arabic-digits-5c7abc3c0580


(Atindra) #42

fit_one_cycle - Is this function adding new layers? Or is it just re-training the last layer in Resnet34? I am not able to understand what is exactly happening in the transfer learning step! Could someone please help?