Let's recap on this chapter so far. We started by implementing an RNN using only numpy. Then, we continued with an LSTM implementation using primitive PyTorch operations. We'll conclude this arc by training the default PyTorch 1.3.1 LSTM implementation for a text classification problem. This example also requires the torchtext 0.4.0 package. Text classification (or categorization) refers to the task of assigning categories (or labels) depending on its contents. Text classification tasks include spam detection, topic labeling, and sentiment analysis. This type of problem is an example of a many-to-one relationship, which we defined in the Introduction to RNNs section.
In this section, we'll implement a sentiment analysis example over the Large Movie Review Dataset (http://ai.stanford.edu/~amaas/data/sentiment/), which consists of...