Silver BlogGold BlogDeep Learning for Coders with fastai and PyTorch: The Free eBook

If you are interested in a top-down, example-driven book on deep learning, check out the draft of the upcoming Deep Learning for Coders with fastai & PyTorch from fast.ai team.



fast.ai is virtually synonymous with its top-down deep learning courses. You may have also used or heard of their equally high quality deep learning, machine learning, linear algebra, and natural language processing courses.

fast.ai is not, however, solely about their courses and video lectures. It has also been a major protagonist in the development of transfer learning for natural language processing; performed an investigation and evaluation of the research into the use of face masks for suppressing the spread of COVID-19; been a voice at the forefront of applied data ethics.

fast.ai has also developed and refined the fastai library during the development of its courses. This library provides easier API access to a variety of machine learning-related functionality, especially when it comes to neural networks. Much of this aspect of the library sits atop PyTorch, making the creation of neural networks with this lower level library easier and flexible for machine learning coders of all skill levels.

Figure

 

As a bridge between their courseware and the fastai library which it uses, Jeremey Howard and Sylvain Gugger are working on a book titled Deep Learning for Coders with fastai and PyTorch: AI Applications Without a PhD, which is not yet available. However, the current draft of this book can be accessed solely for the purposes of personal learning via its Github repo.

Let's be explicit what the repo for this book's draft holds:

These draft notebooks cover an introduction to deep learning, fastai, and PyTorch. fastai is a layered API for deep learning; for more information, see the fastai paper. Everything in this repo is copyright Jeremy Howard and Sylvain Gugger, 2020 onwards.

These notebooks will be used for a course we're teaching in San Francisco from March 2020, and will be available as a MOOC from around July 2020. In addition, our plan is that these notebooks will form the basis of this book, which you can pre-order. It will not have the same GPL restrictions that are on this draft.

It should be clear that the book is under development, and that the only reason you should be forking the repo or making copies of the notebooks are for your own personal learning; they are not to be shared or hosted elsewhere at this point.

[The content] is not licensed for any redistribution or change of format or medium, other than making copies of the notebooks or forking this repo for your own private use.

I reached out to Jeremy Howard, one of the books co-authors, and asked him why people should use this book, and what separates it from the crowd of similar learning resources? Here's what he said:

The book is unusual in that it's taught "top down". We teach almost everything through real examples. As we build out those examples, we go deeper and deeper, and we'll show you how to make your projects better and better. This means that you'll be gradually learning all the theoretical foundations you need, in context, in such a way that you'll see why it matters and how it works. We've spent years building tools and teaching methods that make previously complex topics very simple.

The book teaches PyTorch, the fastest growing deep learning library, and fastai, the most popular higher level API for PyTorch. The book can be ordered from here.

Here's what you can expect from this book as far as topics, taken from the titles of the chapter notebooks:

  1. Your Deep Learning Journey
  2. From Model to Production
  3. Data Ethics
  4. Under the Hood: Training a Digit Classifier
  5. Image Classification
  6. Other Computer Vision Problems
  7. Training a State-of-the-Art Model
  8. Collaborative Filtering Deep Dive
  9. Tabular Modeling Deep Dive
  10. Data Munging with fastai's Mid-Level API
  11. A Language Model from Scratch
  12. Convolutional Neural Networks
  13. ResNets
  14. Application Architectures Deep Dive
  15. The Training Process
  16. A Neural Net from the Foundations
  17. CNN Interpretation with CAM
  18. A fastai Learner from Scratch
  19. Concluding Thoughts

The first thing you have to take notice of, after looking at this chapter list, is the content of the chapter arrangement. Just as the fast.ai courses progress in a top-down fashion, the book proceeds in the same manner. Get coding right away, and progressively move from higher to lower level concepts. Implement a simple machine learning system, and then move on to explaining its constituent parts, expanding on these parts when relevant and necessary.

Another point to note is the inclusion, especially early on, of a topic such as ethics. Generally, such a concept is completely skipped over in contemporary books on machine learning. This is reflective of the leadership role fast.ai, and Rachel Thomas in particular, have taken in machine learning ethics, and integrating such a chapter early in the book expresses its relative importance to not just the authors, but the practice in general.

As a proponent of top-down teaching (and learning), I find this book to be a promising addition to the growing landscape of machine learning texts. If you want to learn deep learning by example, from a team that has seemingly written the book on it, Deep Learning for Coders with fastai and PyTorch is for you.

 
Related: