'Returns the loss value & metrics values for the model in test mode.
Computation is done in batches.
# 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.
batch_size: integer. Number of samples per gradient update.
verbose: verbosity mode, 0 or 1.
sample_weight: Array of weights to weight the contribution
of different samples to the loss and metrics.
# 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.'

def evaluate(self, x, y, batch_size=32, verbose=1, sample_weight=None):

    (x, y, sample_weights) = self._standardize_user_data(x, y, sample_weight=sample_weight, check_batch_axis=False, batch_size=batch_size)
    if (self.uses_learning_phase and (not isinstance(K.learning_phase(), int))):
        ins = (((x + y) + sample_weights) + [0.0])
    else:
        ins = ((x + y) + sample_weights)
    self._make_test_function()
    f = self.test_function
    return self._test_loop(f, ins, batch_size=batch_size, verbose=verbose)
