Now that we've discussed what RNNs are, how to train them, and how to modify them for improved performance, let's build one! The next few sections will cover how we process and represent data for an RNN that uses LSTM units. We will also look at what the network itself looks like, the code for GRU units, and some tools for understanding what our network is doing, too.
Building an LSTM in Gorgonia
Representing text data
While our aim is to predict the next word in a given sentence, or (ideally) predict a series of words that make sense and conform to some measure of English syntax/grammar, we will actually be encoding our data at the character level. This means that we need to take our text data (in this example,...