Training a deep learning language model with a curated IMDb text dataset
In this section, you will go through the process of training a language model on a curated text dataset using fastai. We take a pre-existing language model that is packaged with fastai and fine-tune it with one of the curated text datasets, IMDb, that contains text samples for the movie review use case. The result will be a language model with the broad language capability of the pre-existing language model, along with the use case-specific details of the IMDb dataset. This recipe illustrates one of the breakthroughs made by the team that created fastai, that is, transfer learning applied to NLP.
Getting ready
For the recipes so far in this book, we have recommended using the Gradient environment. You can use Gradient for this recipe and the instructions below include several workarounds to make the recipe work on Gradient. In particular, the pre-trained AWD_LSTM
model will not be available in Gradient if...