parameters: (self, x, y, sample_weight=None)
return_statement: return outputs
docstring: 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.
docstring_summary: Test the model on a single batch of samples.
docstring_tokens: Test the model on a single batch of samples .
function: def 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.
      """
      x, y, sample_weights = self._standardize_user_data(
          x, y, sample_weight=sample_weight, check_batch_axis=True)
      if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
        ins = x + y + sample_weights + [0.]
      else:
        ins = x + y + sample_weights
      self._make_test_function()
      outputs = self.test_function(ins)
      if len(outputs) == 1:
        return outputs[0]
      return outputs
function_tokens: def test_on_batch ( self , x , y , sample_weight = None ) : x , y , sample_weights = self . _standardize_user_data ( x , y , sample_weight = sample_weight , check_batch_axis = True ) if self . uses_learning_phase and not isinstance ( K . learning_phase ( ) , int ) : ins = x + y + sample_weights + [ 0. ] else : ins = x + y + sample_weights self . _make_test_function ( ) outputs = self . test_function ( ins ) if len ( outputs ) == 1 : return outputs [ 0 ] return outputs