# Creating Shakespeare-like content with LSTM

**URL:** <https://discuss.pytorch.org/t/creating-shakespeare-like-content-with-lstm/36129>\
**Category:** Uncategorized\
**Created:** [February 1, 2019, 7:58am UTC](https://discuss.pytorch.org/t/creating-shakespeare-like-content-with-lstm/36129 "2019-02-01T07:58:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixn-w](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/felixn-w/32/11337_2.png) [@felixn-w](https://discuss.pytorch.org/u/felixn-w)\
**Post date:** [February 1, 2019, 7:58am UTC](https://discuss.pytorch.org/t/creating-shakespeare-like-content-with-lstm/36129/1 "2019-02-01T07:58:34Z")

</div>

Dear Pytorch Community,

I am new to Pytorch and neural networks in general. After reading Andrej Karpathy blog entry on [recurrent neural networks](http://karpathy.github.io/2015/05/21/rnn-effectiveness/) I tried to rebuild his Shakespeare example with Pytorch and the use of some of the official Pytorch tutorials.  
However the tests I do so far do no generate any usefull output.  
I would be happy for any improvement recommendations of my [coding on github] ([https://github.com/felixn-w/shakespeare](https://github.com/felixn-w/shakespeare))  
The basic idea is to read all words of a data set with Shakespeare texts, assign an integer to each letter. The model then consists of a LSTM layer and a linear layer meant to predict a respective next letter.

Your assistance is highly appreciated

---

<div class="post-metadata">

**Author:** ![Angry\_potato](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/angry_potato/32/11871_2.png) [@Angry\_potato](https://discuss.pytorch.org/u/Angry_potato)\
**Post date:** [May 2, 2020, 2:46pm UTC](https://discuss.pytorch.org/t/creating-shakespeare-like-content-with-lstm/36129/2 "2020-05-02T14:46:59Z")

</div>

Was your attempt successful.
