title: Keras input layer
body: <p>I am unsure if I need to add a Dense input layer before adding LSTM layers in my model. Forexample, with the following model:</p>
  <pre><code># Model
  model = Sequential()
  model.add(LSTM(128, input_shape=(train_x.shape[1], train_x.shape[2])))
  model.add(Dense(5, activation=&quot;linear&quot;))
  </code></pre>
  <p>Will the LSTM layer be the input layer, and the Dense layer the output layer (meaning no hidden layers)? Or does Keras create an input layer meaning the LSTM layer will be a hidden layer?</p>