title: Keras LSTM input incompatible with layer, expected ndim=3, found ndim=4
body: <p>I'm trying out embedding with LSTM and have the following in Keras:</p>
  
  <pre><code>inp = Input(shape=(20, 1))
  x = Embedding(total_words, 256)(inp)
  x = LSTM(128)(x)
  output = Dense(1, activation ='softmax')(x)
  </code></pre>
  
  <p>However, I don't understand why I keep getting the following error at the line <code>x = LSTM(128)(x)</code>:</p>
  
  <pre><code>ValueError: Input 0 is incompatible with layer lstm_12: expected ndim=3, found ndim=4
  </code></pre>
  
  <p>What have I missed out?</p>