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)

Training a recommender system on a small curated dataset

You may recall that Chapter 1, Getting Started with fastai, described applications supported by fastai to cover four types of datasets: tabular, text, recommender systems, and images. In Chapter 2, Exploring and Cleaning Up Data with fastai, you saw sections on examining tabular datasets, text datasets, and image datasets.

You may have wondered why there wasn't a section on examining recommender system datasets. The reason is that the data ingestion process for recommender systems in fastai is identical to the process for tabular datasets, as you will see in this section. While the ingestion process for recommender systems in fastai is identical to the ingestion process for tabular datasets, fastai does provide model training details that are specifically intended for recommender systems.

In this section, we will go through the process of training a recommender system on a curated dataset to learn how to train recommender...