title: Keras: What if the size of data is not divisible by batch_size?
body: <p>I am new to Keras and just started working on some examples. I am dealing with the following problem: I have 4032 samples and use about 650 of them as for the fit or basically the training state and then use the rest for testing the model. The problem is that I keep getting the following error:</p>
  
  <pre><code>Exception: In a stateful network, you should only pass inputs with a number of samples that can be divided by the batch size.
  </code></pre>
  
  <p>I understand why I am getting this error, my question is, what if the size of my data is not divisible by <code>batch_size</code>? I used to work with Deeplearning4j LSTM and did not have to deal with this problem. Is there anyway to get around with this?</p>
  
  <p>Thanks</p>