LSTM implementation explained

@machinelearnbot 

For a long time I've been looking for a good tutorial on implementing LSTM networks. They seemed to be complicated and I've never done anything with them before. Quick googling didn't help, as all I've found were some slides. Fortunately, I took part in Kaggle EEG Competition and thought that it might be fun to use LSTMs and finally learn how they work. I based my solution and this post's code on char-rnn by Andrej Karpathy, which I highly recommend you to check out.