title: Input shape for Keras LSTM/GRU language model
body: <p>I am trying to train a language model on word level in Keras. </p>
  
  <p>I have my X and Y, both with the shape (90582L, 517L)</p>
  
  <p>When I try fit this model:</p>
  
  <pre><code>print('Build model...')
  model = Sequential()
  model.add(GRU(512, return_sequences=True, input_shape=(90582, 517)))
  model.add(Dropout(0.2))
  model.add(GRU(512, return_sequences=True))
  model.add(Dropout(0.2))
  model.add(TimeDistributedDense(1))
  model.add(Activation('softmax'))
  model.compile(loss='categorical_crossentropy', optimizer='rmsprop')
  model.fit(x_pad, y_pad, batch_size=128, nb_epoch=2)
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>Exception: Error when checking model input: 
  expected gru_input_7 to have 3 dimensions, but got array with shape (90582L, 517L)
  </code></pre>
  
  <p>I need some guidance as to what the input shape should be? I've done trial and error on all sorts of combinations but it seems I am misunderstanding something fundamental.</p>
  
  <p>In the Keras text generation example, the X matrix had 3 dimensions. I have no idea what the third dimension is supposed to be though.  </p>