Implementing the language model
Here, we will discuss the details of the LSTM implementation.
First, we will discuss the hyperparameters that are used for the LSTM and their effects.
Thereafter, we will discuss the parameters (weights and biases) required to implement the LSTM. We will then discuss how these parameters are used to write the operations taking place within the LSTM. This will be followed by understanding how we will sequentially feed data to the LSTM. Next, we will discuss how to train the model. Finally, we will investigate how we can use the learned model to output predictions, which are essentially bigrams that will eventually add up to a meaningful story.
Defining the TextVectorization layer
We discussed the TextVectorization
layer and used it in Chapter 6, Recurrent Neural Networks. We’ll be using the same text vectorization mechanism to tokenize text. In summary, the TextVectorization
layer provides you with a convenient way to integrate...