Book Image

Deep Learning with fastai Cookbook

By : Mark Ryan
Book Image

Deep Learning with fastai Cookbook

By: Mark Ryan

Overview of this book

fastai is an easy-to-use deep learning framework built on top of PyTorch that lets you rapidly create complete deep learning solutions with as few as 10 lines of code. Both predominant low-level deep learning frameworks, TensorFlow and PyTorch, require a lot of code, even for straightforward applications. In contrast, fastai handles the messy details for you and lets you focus on applying deep learning to actually solve problems. The book begins by summarizing the value of fastai and showing you how to create a simple 'hello world' deep learning application with fastai. You'll then learn how to use fastai for all four application areas that the framework explicitly supports: tabular data, text data (NLP), recommender systems, and vision data. As you advance, you'll work through a series of practical examples that illustrate how to create real-world applications of each type. Next, you'll learn how to deploy fastai models, including creating a simple web application that predicts what object is depicted in an image. The book wraps up with an overview of the advanced features of fastai. By the end of this fastai book, you'll be able to create your own deep learning applications using fastai. You'll also have learned how to use fastai to prepare raw datasets, explore datasets, train deep learning models, and deploy trained models.
Table of Contents (10 chapters)

To get the most out of this book

To get the most out of this book, you should be comfortable with coding in Python (in Jupyter notebooks and in standalone Python modules) and with the core concepts of machine learning. This book explains a broad variety of deep learning applications but doesn't go into the internals of deep learning itself. If you have a basic grasp of how deep learning works, you will find the more advanced examples in the book easier to follow.

Most of the code examples in this book are designed to be run in GPU-enabled cloud deep learning Jupyter notebook environments. You have the choice of using either Paperspace Gradient or Google Colab for these examples, with Gradient being the recommended environment. The model deployment examples in Chapter 7, Deployment and Model Maintenance, and Chapter 8, Extended fastai and Deployment Features, are designed to be run on your local system and require fastai and PyTorch to be installed on your local system.

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.