#NEWLINE# def evaluate_generator( self , generator , val_samples , max_q_size = 10 , **kwargs ) : #NEWLINE# #INDENT# 'Evaluates the model on a data generator. The generator should\n        return the same kind of data as accepted by `test_on_batch`.\n\n        Arguments:\n            generator:\n                generator yielding tuples (inputs, targets)\n                or (inputs, targets, sample_weights)\n            val_samples:\n                total number of samples to generate from `generator`\n                before returning.\n            max_q_size: maximum size for the generator queue\n        ' #NEWLINE# if ( self . model is None ) : #NEWLINE# #INDENT# raise Exception ( 'The model needs to be compiled before being used.' ) #NEWLINE# #UNINDENT# if ( 'show_accuracy' in kwargs ) : #NEWLINE# #INDENT# kwargs . pop ( 'show_accuracy' ) #NEWLINE# warnings . warn ( 'The "show_accuracy" argument is deprecated, instead you should pass the "accuracy" metric to the model at compile time:\n`model.compile(optimizer, loss, metrics=["accuracy"])`' ) #NEWLINE# #UNINDENT# if ( 'verbose' in kwargs ) : #NEWLINE# #INDENT# kwargs . pop ( 'verbose' ) #NEWLINE# warnings . warn ( 'The "verbose" argument is deprecated.' ) #NEWLINE# #UNINDENT# if generator : #NEWLINE# #INDENT# raise Exception ( ( 'Received unknown keyword arguments: ' + str ( kwargs ) ) ) #NEWLINE# #UNINDENT# return self . model . evaluate_generator ( generator , val_samples , max_q_size = max_q_size )