To apply RNNs in this setting, we pass the text to be classified through the RNN a word at a time generating a new hidden layer at each time step. We can then take the hidden layer for the last token of the text, h n , to constitute a compressed representation of the entire sequence. We can pass this representation h n to a feedforward network that chooses a class via a softmax over the possible classes. Fig. 9 .8 illustrates this approach.