Change language

Deep Learning for Coders with fastai and PyTorch


Deep Learning for Coders with fastai and PyTorch Jeremy Howard, Sylvain Gugger

Deep Learning for Coders with fastai and PyTorch: AI Applications Without a PhD. Deep learning is often seen as the exclusive domain of math PhDs and big tech companies. But as this how-to guide shows, programmers comfortable with Python can achieve impressive deep learning results with little math knowledge, small amounts of data, and minimal code. How? ’Or’ What? With fastai, the first library to provide a consistent interface to the most frequently used deep learning applications.

Authors Jeremy Howard and Sylvain Gugger, the creators of fastai, show you how to train a model for a wide variety of tasks using fastai and PyTorch. You will also gradually dive deeper into deep learning theory to gain a complete understanding of algorithms behind the scenes.

  • Train models in computer vision, natural language processing, tabular data, and collaborative filtering
  • Learn the latest deep learning techniques that matter most in practice
  • Improve accuracy, speed, and reliability by understanding how deep learning models work
  • Discover how to turn your models into web applications
  • Implement deep learning algorithms from scratch
  • Consider the ethical implications of your work

From the preface

Deep learning is a powerful new technology that we believe needs to be applied across many disciplines. Domain experts are more likely to find new uses, and we need more people from all backgrounds to get involved and start using it.

That's why Jeremy co-founded to make deep learning easier through free online courses and software. Sylvain is a research engineer at Hugging Face. Previously, he was a research associate at and a former teacher of mathematics and computer science in a program that prepares students for entry into French elite universities. We wrote this book together, hoping to bring deep learning to as many people as possible.

Who is this book for?

If you are a complete beginner in deep learning and machine learning, you are welcome here. We just expect that you already have some programming skills, preferably in Python. If you are already a loyal deep learning practitioner, you will find a lot here too. In this book, we'll show you how to get great results, including the latest research techniques. As we will demonstrate, this requires neither advanced mathematics training nor years of study. It just takes some common sense and perseverance.

Deep Learning for Coders with fastai and PyTorch PDF

If you have no programming experience, that's okay too! The first three chapters have been written explicitly so that executives, product managers, etc. understand the most important things they need to know about deep learning. If you see pieces of code in the text, try browsing them to get an intuitive idea of ​​what they are doing. We explain them line by line. The details of the syntax are nowhere near as important as a thorough understanding of what is happening.

Deep Learning for Coders with fastai and PyTorch eBook

As mentioned above, the only requirement is that you know how to program (one year of experience is enough), preferably in Python, and have taken at least one math class in high school. It doesn't matter if you remember little about it at the moment; we will update it if necessary. Khan Academy has great free online resources that can help you.

We're not saying that deep learning doesn't use math beyond high school level, but we'll teach you the basics you need (or give you the resources) you need as we cover the subjects that require them.

The book starts with the big picture and gradually digs beneath the surface, so from time to time you may have to put it aside and learn an additional topic (a way to code something or some math). That's fine, and that's how we want to read the book. Start by browsing and consult additional resources only when needed.

Note that Kindle users or other e-reader readers may need to double-click the images to view the full versions.

Deep Learning for Coders with fastai and PyTorch book authors

Jeremy Howard is an entrepreneur, business strategist, developer and educator. Jeremy is a founding researcher at, a research institute dedicated to improving access to deep learning. He is also a Distinguished Research Scientist at the University of San Francisco, a faculty member at Singularity University and a Young Global Leader at the World Economic Forum.

Jeremy's latest startup, Enlitic, was the first to apply deep learning to medicine and was named one of the 50 smartest companies in the world by MIT Tech Review for two consecutive years. Previously, he was President and Chief Scientist of the data science platform Kaggle, where he was the first place in international machine learning competitions for two consecutive years. He was the founding CEO of two successful Australian startups (FastMail and Optimal Decisions Group - acquired by Lexis-Nexis). Previously, he worked for 8 years in management consulting at McKinsey & Co and AT Kearney. Jeremy has invested in many startups, supervised and recommended them, and participated in many open source projects.

He has made many television appearances and other videos, including being a regular guest on Australia's top-rated breakfast news program, a popular speech on, and tutorials and discussions on data science and web development.

Sylvain is a former teacher and researcher at, with the goal of making deep learning more accessible by developing and improving techniques that allow models to train quickly with limited resources.

Previously, Sylvain wrote several books covering the entire course he teaches in France (published by Éditions Dunod) until 2015 in CPGE. The CPGEs are a specific two-year French program where handpicked students who have graduated from high school undergo intense preparation before taking the competitive examination to enter the best engineering and business schools in the country. Sylvain taught computer science and mathematics in this program for seven years. Sylvain is a former student of the École Normale Supérieure (Paris, France) where he studied mathematics and holds a Masters in mathematics from the University of Paris XI (Orsay, France).

Deep Learning for Coders with fastai and PyTorch Book reviews


I often see people asking for a good starting point for AI, machine learning, and NeuralNets. This book is a great place. It's modern (the current version was released in August 2020), hands-on, teaches you by doing, only delves into it when you need it, and is also in line with the course, which was updated in August. Overall, it's a great introduction to the field.

Kishore Ramachandran

I cannot recommend this book enough. I am eternally grateful to Jeremy and Sylvain for taking the time to create this work of art. Very well written, and the code, examples, accompanying website, and lessons are delightful!

Amazon customer

This is a great book if you're into deep learning. I have I've been working on it for the last week or so and figured out it's a excellent resource. It's the biggest advantage over other books and courses I have What is seen is that it offers a great top-down approach to diving deep To learn. Instead of wading through a lot of math and stuff before we get to it real-world applications, this book will quickly show you how to create real-world applications in different domains (image classification, natural language processing, etc.), and goes into the details later. So you can choose how deep you want to dig deeper into the specs and still get great results even if you aren't Super interested in all the details.

A few years ago I was involved in most of the free videos from Jeremy of course also fantastic and very similar to this book. but Personally, I find that using this book is an even better way to learn and review the material, as it is easier to touch topics that I already know, It is easier to skip and refer to certain topics in the book than to try to find relevant sections in the video. It looks like this book he's following the video course pretty closely, so that would be great Companion / reference for those who work through the video course, but it can also be used alone very well.

If you're new to deep learning, I recommend this book and Highly recommend Video courses.


You buy a great book and you get a great course and community that supports the library. The best way to learn deep learning or to dive into the basics.

This book makes learning deep learning and pyTorch MUCH EASIER. I was also pleased that the book is available for free as a MOOC on their website so I didn't have to open the book every time I sat down at the computer. The print is the usual high quality you would expect from O'Reilly. The Fastai library made deep learning accessible to everyone.

F. Huynh

Oh. This book is just amazing. The enthusiasm of the authors is contagious. Those who learn best cannot go wrong with this book. I recommend it to anyone who wants to get started but feels a little lost and scared. Lots of snippets of code that you can run right away. We encourage you to visit the books website at It has the latest and greatest instructions. They also worked with GPU cloud providers to set up a turnkey environment for running the code snippets. Personally, I use Paperspace, but there are other options too.


Don't go for the cheaper 'shroff-publisher' version of the real book. Only 224 pages said they were in color, but I also found those pages to be of poor quality and the remaining pages were found to be inferior. Any book that deals with the visualization of data in any form requires high quality color printing. hence my disgust for black and white pages.

If you're on a tight budget, go for the Shroff model. Advantages: high quality printing and paper. Slightly shiny appearance. Cons: The imported one I got is very expensive. For this reason I want to promote Make in India. The import tax is extremely high. We should at least have a decent publication.

This book is recommended by many for ML and DL beginners.

Tommaso Capelle

I recommend this book to anyone looking for updated PyThorch / deep learning material. It's very well written, and the accompanying Github repo is very useful (it's actually the book!). Warning: you love Jupyter notebooks.

Preeti Gopal

Although the course content is available online for free, I don't regret having the book with me on paper. You have to see what the text looks like to see the power of Jupyter-N

If you are a complete newbie to deep learning & machine learings, you are very welcome here. Our only requirement is that you already know what programming is. If you are already an experienced deep learning practitioner, you'll also find a lot here, especially if you're a beginner. In this book, we'll be showing you how to get world-class results, with techniques from the latest research, without requiring any advanced mathematical training or years' worth of study. We won't be covering everything here, but instead focusing on the essentials.

Deep Learning for Coders with fastai and PyTorch book reviews 2022

Review by J. Yoon

While no one should ever be forced to just read one book, if I were forced to pick one, this would be the one. It's not overly long, and covers everything needed to start learning deep learning. It's also not too heavy on theory, and instead focuses on practical examples. The authors carefully selected just the right amount of material and not too much. Every important concept is clearly explained. Some of the topics are covered multiple times, progressing deeper into each topic. The book is chocked full of Jupytern notebooks that you can use to create your own projects. These notebooks contain pre-written code that you can copy/paste into your own notebook.

They also include Jupyter Notebooks that you can modify to suit your needs. The Fastai library contains many functions that make working with Python and Torch easy. It also provides a unified API for interacting with Pandas, Numpy, and Pytorch. It also sets many default parameters that work in the majority cases. Later on, users can go directly to the source code, but initially these defaults and the single unified API saves a lot of effort.

Review by Y.B.

What an amazing book. What an amazing venture Sylvian and Jeremy have undertaken. I've done parts of video course before. I was very excited when I heard about the book. And I wasn't disappointed. For those who prefer reading material to watching videos, this will be a great release. I haven't finished all materials yet, but I've read enough to enjoy what is presented. The book is well put together, well thought out and the ideas explored are pretty interesting in and of themselves, especially if you're interested in machine learning. For those who use Kindle devices, I'm happy that the book opens on both Kindle 2 and iPad, iPhone and web reading applications.

Screenshot above is taken from the web reading app. You can see in the screenshot that the formatting is really nicely done -- you can highlight code snippets and make notes. (Those of you familiar with technical books on your Kindle will know that it is rare that publishers do the effort to format the book correctly -- often they just make images out of the code snippets, making for a bloated book size and useless content from the perspective of readers). Fortunately, this book is formatted beautifully. Thanks, O'Reilly (Sylvain and Jeremy presumably as much, for their open access publication of the book which is also on github).


Review by Preeti Gopal

Although the course content can be accessed online for free, I would recommend purchasing a copy of the book because it has a much better presentation than the online version. The paper and print quality are also very good. After spending so many hours writing in jupyter notebook, it is nice to finally finish reading a book in print.

Review by Sam

Although the course content can be accessed online for free, I would recommend purchasing a copy of the book because it has a much better presentation than the online version. The paper and print quality are also very good. After spending so many hours writing in jupyter notebook, it is nice to finally finish reading a book in print.

Review by Raul De Castro

Excellent impression and of course, one of the best book choices on the subject. Among a vast body of things to learn, I would consider this work as the fundamental and practical axis to enter or deepen the practice of Deep Learning.

See also

Learn programming in R: courses


Best Python online courses for 2022


Best laptop for Fortnite


Best laptop for Excel