'Evaluates the model over a single batch of samples.
# Arguments
x: input data, as a Numpy array or list of Numpy arrays
(if the model has multiple inputs).
y: labels, as a Numpy array.
sample_weight: sample weights, as a Numpy array.
# Returns
Scalar test loss (if the model has no metrics)
or list of scalars (if the model computes other metrics).
The attribute `model.metrics_names` will give you
the display labels for the scalar outputs.
# Raises
RuntimeError: if the model was never compiled.'

def test_on_batch(self, x, y, sample_weight=None):

    if (not self.built):
        raise RuntimeError('The    model    needs    to    be    compiled    before    being    used.')
    return self.model.test_on_batch(x, y, sample_weight=sample_weight)
