title: How can a LSTM have an output_dim different than the input_dim of the next layer?
body: <p>I was looking at this code:</p>
  <pre><code>model = Sequential()
  model.add(LSTM(input_shape = (1,), input_dim=1, output_dim=6, return_sequences=True))
  model.add(LSTM(input_shape = (1,), input_dim=1, output_dim=6, return_sequences=False))
  model.add(Dense(1))
  model.add(Activation('linear'))
  </code></pre>
  <p>How can the first layer have an output of dim=6 and then the next layer have an input_dim=1?</p>
  <h1>Edit</h1>
  <p>The code is wrong and Keras simply tries its best as shown in the actual generated model (see how the model doesn't match the code):
  <a href="https://i.stack.imgur.com/utkTa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/utkTa.png" alt="enter image description here" /></a></p>