title: LSTM predicts differently as the length of input data changes
body: <p><em><strong>NOTE</strong>: all the numbers below are indicative only.</em></p>
  <p>I trained my LSTM model with the following parameters:</p>
  <pre><code>batch_size = 32
  time_step = 5
  </code></pre>
  <p>I know I need at least 5 samples to feed my <code>model.predict()</code> in order to predict the next outcome into the future. For example let's say I have the following items in a CSV file:</p>
  <p><a href="https://i.stack.imgur.com/YZRB0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YZRB0.jpg" alt="enter image description here" /></a></p>
  <p>Since <code>time_step</code> equals to 5, I convert the data into an array with the sahpe of 1 x 5 x 4. Let's call this array <strong>X_input</strong>. Now:</p>
  <pre><code>model.predict(X_input)
  </code></pre>
  <p>is supposed to return only 1 item. Let's say this value is 58 which is the right answer. If the CSV file contains, for example, 6 items:</p>
  <p><a href="https://i.stack.imgur.com/kGIue.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kGIue.jpg" alt="enter image description here" /></a></p>
  <p><strong>X_input</strong> should have the shape of 2 x 5 x 4 and <code>model.predict()</code> returns two values which are supposed to be [57, 58].</p>
  <p>In fact, if the last 5 samples in my CSV file are the same, I expect the last predicted value remains the same (i.e. 58), but it does NOT! It changes as the number of samples in my CSV file change despite the fact that I keep the last 5 samples in the CSV file unchanged.</p>
  <p>At first I thought it might have something to do with the parameter <code>stateful</code> in my LSTM layers. But since I've not used that parameter, I assume it has the default value which is Flase.</p>
  <p>Any idea please?</p>