title: Understanding clearly how LSTM solves for vanishing and exploding gradient
body: <p>I am about to start coding an LSTM using Keras/Theano.</p>
  
  <p>As I understand it, using an LSTM (as opposed to a vanilla RNN) avoids vanishing and exploding gradients.</p>
  
  <p>Could someone explain clearly (or provide their favorite link to a clear answer) that explains how LSTM, with its forget gate, memory cell input, and memory cell output gate prevent both the vanishing and exploding gradients.</p>
  
  <p>Are there any other variants of RNNs that also avoids these issues?  Or is LSTM the only RNN-variant that does this?</p>