title: batch size for LSTM
body: <p>I've been trying to set up an LSTM model but I'm a bit confused about batch_size. I'm using the Keras module in Tensorflow.</p>
  
  <p>I have <strong>50,000 samples</strong>, each has <strong>200 time steps</strong> and each time step has <strong>three features</strong>. So I've shaped my training data as <code>(50000, 200, 3)</code>. </p>
  
  <p>I set up my model with <strong>four LSTM layers</strong>, each having <strong>100 units</strong>. For the first layer I specified the input shape as <code>(200, 3)</code>. The first three layers have <code>return_sequences=True</code>, the last one doesn't. Then I do some <code>softmax</code> classification.</p>
  
  <p>When I call <code>model.fit</code> with <code>batch_size='some_number'</code> do Tensorflow/Keras take care of feeding the model with batches of the specified size? Do I have to reshape my data somehow in advance? What happens if the number of samples is not evenly divisible by <code>'some_number'</code>?</p>
  
  <p>Thanks for your help!</p>