title: What is the rule to know how many LSTM cells and how many units in each LSTM cell do you need in Keras?
body: <p>I know that a LSTM cell has a number of ANNs inside. </p>
  
  <p>But when defining the hidden layer for the same problem, I have seen some people using only 1 LSTM cell and others use 2, 3 LSTM cells like this - </p>
  
  <pre><code>model = Sequential()
  model.add(LSTM(256, input_shape=(n_prev, 1), return_sequences=True))
  model.add(Dropout(0.3))
  model.add(LSTM(128, input_shape=(n_prev, 1), return_sequences=True))
  model.add(Dropout(0.3))
  model.add(LSTM(64, input_shape=(n_prev, 1), return_sequences=False))
  model.add(Dropout(0.3))
  model.add(Dense(1))
  model.add(Activation('linear'))
  </code></pre>
  
  <ol>
  <li>Is there any rule as to how many LSTM cells you should take? Or its just manual experimenting? </li>
  <li>Another question following this is, how many units you should take in an LSTM cell. Like some people take 256, some take 64 for the same problem. </li>
  </ol>