'Evaluates the model on a data generator.
The generator should return the same kind of data
as accepted by `test_on_batch`.
# Arguments
generator: Generator yielding tuples (inputs, targets)
or (inputs, targets, sample_weights)
steps: Total number of steps (batches of samples)
to yield from `generator` before stopping.
max_queue_size: maximum size for the generator queue
workers: maximum number of processes to spin up
use_multiprocessing: if True, use process based threading.
Note that because this implementation
relies on multiprocessing, you should not pass
non picklable arguments to the generator
as they can\'t be passed easily to children processes.
# 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.'

@interfaces.legacy_generator_methods_support
def evaluate_generator(self, generator, steps, max_queue_size=10, workers=1, use_multiprocessing=False):

    if (not self.built):
        raise RuntimeError('The    model    needs    to    be    compiled    before    being    used.')
    return self.model.evaluate_generator(generator, steps, max_queue_size=max_queue_size, workers=workers, use_multiprocessing=use_multiprocessing)
