May 2018
Intermediate to advanced
472 pages
11h 27m
English
Now let's look at our first example of using an RNN for an interesting task. In this exercise, we will be using an RNN to generate a fairy tale story! This is a one-to-one RNN problem. We will train a single layer RNN on a collection of fairy tales and ask the RNN to generate a new story. For this task, we will use a small text corpus of 20 different tales (which we will increase later). This example also will highlight one of the crucial limitations of RNNs: the lack of persisting long-term memory. This exercise is available in rnn_language_bigram.ipynb in the ch6 folder.
First, we will define several hyperparameters needed for our RNN, as shown here:
Read now
Unlock full access