This LSTM-RNN model can produce text based on the text it is fed. For this exercise the model is trained on Anna Karenina and generates a text based on the novel.
In this notebook, I'll construct a character-level LSTM with PyTorch. The network will train character by character on some text, then generate new text character by character. As an example, I will train on Anna Karenina. This model will be able to generate new text based on the text from the book!
This network is based off of Andrej Karpathy's post on RNNs and implementation in Torch. Below is the general architecture of the character-wise RNN.
For the more explanation and to see the solution, please check Character_Level_RNN notebook.