title: Keras: difference between test_on_batch and predict_on_batch
body: <p>In Philippe Remy's <a href="http://philipperemy.github.io/keras-stateful-lstm/" rel="noreferrer">blog post</a> on stateful LSTM, at the bottom he says "You may have to do your validation/testing manually by calling predict_on_batch() or test_on_batch()". </p>
  
  <p>Looking at <a href="https://keras.io/models/model/" rel="noreferrer">the documentation</a>, predict_on_batch does this:</p>
  
  <pre><code>predict_on_batch(self, x)
  
  Returns predictions for a single batch of samples.
  
  Arguments
  
      x: Input samples, as a Numpy array.
  
  Returns
  
  Numpy array(s) of predictions.
  </code></pre>
  
  <p>And test_on_batch does this:</p>
  
  <pre><code>test_on_batch(self, x, y, sample_weight=None)
  
  Test the model on a single batch of samples.
  
  Arguments
  
      x: Numpy array of test data, or list of Numpy arrays if the model has multiple inputs. If all inputs in the model are named, you can also pass a dictionary mapping input names to Numpy arrays.
      y: Numpy array of target data, or list of Numpy arrays if the model has multiple outputs. If all outputs in the model are named, you can also pass a dictionary mapping output names to Numpy arrays.
      sample_weight: Optional array of the same length as x, containing weights to apply to the model's loss for each sample. In the case of temporal data, you can pass a 2D array with shape (samples, sequence_length), to apply a different weight to every timestep of every sample. In this case you should make sure to specify sample_weight_mode="temporal" in compile().
  
  Returns
  
  Scalar test loss (if the model has a single output and no metrics) or list of scalars (if the model has multiple outputs and/or metrics). The attribute model.metrics_names will give you the display labels for the scalar outputs
  </code></pre>
  
  <p>I'm using train_on_batch in my training loop, basically exactly as the blog post does. How do I know whether to use predict_on_batch or test_on_batch for cross-validation?</p>