'Computes the loss on some input data, batch by batch.
# 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.
batch_size: integer. Number of samples per gradient update.
verbose: verbosity mode, 0 or 1.
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 evaluate(self, x, y, batch_size=32, verbose=1, sample_weight=None):

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