Chapter 4: Training Models with Text Data

In Chapter 3, Training Models with Tabular Data, you went through a series of recipes that demonstrated how to use the facilities of fastai to train deep learning models on tabular data. In this chapter, we will examine how to take advantage of the fastai framework to train deep learning models on text datasets.

To explore deep learning with text data in fastai, we will start by taking a pre-trained language model (that is, a model that, when given a phrase, predicts what words come next) and fine-tuning it with the IMDb curated dataset. We will then use the resulting fine-tuned language model to create a text classifier model for the movie review use case represented by the IMDb dataset. The text classifier ...

Get Deep Learning with fastai Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.