title: Confusion about Keras RNN Input shape requirement
body: <p>I have read plenty of posts for this point. They are inconsistent with each other and every answer seems to have a different explanation so I thought to ask based on my analyzing of all of them.</p>
  
  <p>As Keras <a href="https://keras.io/layers/recurrent/" rel="noreferrer">RNN</a> documentation states, the <strong>input shape</strong> is always in this form <code>(batch_size, timesteps, input_dim)</code>. I am a bit confused about that but I guess, not sure though, that <code>input_dim</code> is always 1 while <code>timesteps</code> depends on your problem (could be the data dimension as well). Is that roughly correct?</p>
  
  <p>The reason for this question is that I always get an error when trying to change the value of <code>input_dim</code> to be my dataset dimension (as input_dim sounds like that!!), so I made an assumption that <code>input_dim</code> represent the shape of the input vector to LSTM at a time. Am I wrong again?</p>
  
  <pre><code>C = C.reshape((C.shape[0], C.shape[1], 1))
  tr_C, ts_C, tr_r, ts_r = train_test_split(C, r, train_size=.8)
  batch_size = 1000
  
  print('Build model...')
  model = Sequential()
  
  model.add(LSTM(8, batch_input_shape=(batch_size, C.shape[1], 1), stateful=True, activation='relu'))
  model.add(Dense(1, activation='relu'))
  
  print('Training...')
  model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
  
  model.fit(tr_C, tr_r,
            batch_size=batch_size, epochs=1,
            shuffle=True, validation_data=(ts_C, ts_r))
  </code></pre>
  
  <p>Thanks!</p>