Fastai library notes

Hi All,

I made below notes for high level view of fastai library. I just wrote this to have high level understanding of what is happening where so that I can concentrate on learning rather than checking python code.

Many of them are blank, I could not make it from high level what is happening in those.

Any ideas about those would be great.

Thanks,

File name High level summary
imports.py Class which loads all external libraries e.g matplot lib etc
transforms.py Classes for doing image related transformations e.g resize, reshape, crop etc
learner.py Class representing a general learner. All other types of learner extend this class. e.g. CNN extends this and is coded in conv_learner.py
conv_learner.py Class representing Convulation network learner
core.py Defines general methods like convert to Tensor, One hot encode , Convert to GPU etc.
model.py
dataset.py Class representing different types of datasets. e.g FileDataset , ImageDataset etc.
sgdr.py Class for stochastic gradient descent with restarts (SGDR), a variant of learning rate annealing, which gradually decreases the learning rate as training progresses
plots.py Utilities to do different types of plots. e.g Confusion matrix , Most by incorrect etc
layer_optimizer.py
initializers.py
torch_imports.py Torch library related imports and imports of pre-trained models like resnet etc.
metrics.py Metrics like accuracy, threshold etc
io.py Input output utility to download files
losses.py Loss functions in torch
nlp.py Utilities for working with text data / NLP
lm_rnn.py Different types of RNN learners e.g Sequential, Multi batch , Linear
structured.py
set_spawn.py
rnn_train.py
rnn_reg.py
utils.py
44 Likes

Awesome! Thanks for that, @jagatsingh!

ah thanks a lot for doing that

Thanks, Quite helpful!

@sermakarevich These FastAI notes seem nice

So I created some notes too, in form of class diagram.

Two days ago I’ve had no idea of the comprehensiveness of this piece of code :wink:

fastai library v2.pdf (898.7 KB)

This diagram is not yet complete. If any of you want to work on it some more I can upload source OmniGraffle file.

29 Likes

Wow! That is really really impressive!

This might be my wallpaper for a bit

1 Like

Me too :slight_smile:

1 Like

I recommend 4K display for this :stuck_out_tongue:

You need to make it higher res for that :slight_smile:

Awesome stuff !

Is there some online format/place that you might be able to push it to? Would be nice for others to be able to help contribute, link to sections, etc. Just a thought - either way it’s cool how much work you’ve put into this!

1 Like

I agree with @mindtrinket - high res is needed. I have been told that wall mural 2x3m cant be made from this pdf.

1 Like

Thank You …
Just wanted to know how to create such thing?

Is there some online format/place that you might be able to push it to?

That is very good question. I’m sure there is plethora of web based diagramming/UML tools out there but I don’t have experience with any of them.

Maybe there is someone on this forum that does and can point us in the right direction?

I’m willing to put some work into redoing this in the new tool.

Just wanted to know how to create such thing?

It’s my freestyle and very loose interpretation of UML (Unified Modeling Language) Class & Package Diagram.

The tool that I tend to use is OmniGraffle which is diagramming tool for ‘website wireframes, family trees and maps of software classes’ for macOS. In the past I just utilized Keynote which is presentation software for macOS.

For more formal diagramming Visual Paradigm for UML might be right tool.

3 Likes

This looks great. Thanks for putting your time into this and sharing. :beers:

Looks like we can open omnigraffle files on our own computer: https://chrome.google.com/webstore/detail/free-omnigraffle-graffle/ahlhlpmldjfennoppdkhpnljgihpnnpj?hl=en-US .

(Personally, I use graphviz for class diagrams and stuff like that. I find it easier and faster than using a GUI, and also I can often auto-generate much or all of the diagram using reflection. Easy to put the results in a webpage too.)

While poring over fastai code with the help Wojceich’s class diagrams, I found it helpful to list all the packages and pytorch modules used by fastai library with a one line summary. Please let me know if there is any other better/easier way to keep these updated. I have made it a shared so anyone can edit it.

1 Like