title: batch_input_shape tuple on Keras LSTM
body: <p>I have the following feature vector that consists in a single feature for each sample and 32 samples at total:</p>
  
  <p>X = [[0.1], [0.12], [0.3] ... [0.10]]</p>
  
  <p>and a label vector that consists of binary values </p>
  
  <p>Y = [0, 1, 0 , 0, .... 1] (with 32 samples as well)</p>
  
  <p>I'm trying to use Keras LSTM to predict the next value of the sequence based on a new entry. 
  What I can't figure out is what the "batch_input_shape" tuple means for instance:</p>
  
  <pre><code> model.add(LSTM(neurons, batch_input_shape=(?, ?, ?), return_sequences=False, stateful=True))
  </code></pre>
  
  <p>According to <a href="http://philipperemy.github.io/keras-stateful-lstm/" rel="noreferrer">this</a> article the first one is the batch size, but what about the other two? Are they the number of features for each sample and the number of samples? 
  What should be the value of batch_size in this case?</p>
  
  <p>At the moment receiving the error message:</p>
  
  <pre><code>ValueError: Error when checking input: expected lstm_1_input to have 3 dimensions, but got array with shape (32, 1)
  </code></pre>
  
  <p>Edit: Here is the model declaration:</p>
  
  <pre><code>def create_lstm(batch_size, n_samples, neurons, dropout):
  model = Sequential()
  model.add(LSTM(neurons, batch_size=batch_size, input_shape=(n_samples, 1), return_sequences=False, stateful=True))
  model.add(Dropout(dropout))
  model.add(Dense(1, activation='sigmoid'))
  model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
  return model
  </code></pre>