parameters: (self,
                 model,
                 x=None,
                 y=None,
                 batch_size=None,
                 verbose=1,
                 sample_weight=None,
                 steps=None,
                 callbacks=None,
                 **kwargs)
return_statement: return training_arrays.test_loop(
          model,
          inputs=dataset,
          batch_size=batch_size,
          verbose=verbose,
          steps=steps,
          callbacks=callbacks)
docstring: Evaluate loop for Distribution Strategies.
docstring_summary: Evaluate loop for Distribution Strategies.
docstring_tokens: Evaluate loop for Distribution Strategies .
function: def evaluate(self,
                 model,
                 x=None,
                 y=None,
                 batch_size=None,
                 verbose=1,
                 sample_weight=None,
                 steps=None,
                 callbacks=None,
                 **kwargs):
      """Evaluate loop for Distribution Strategies."""
      dist_utils.validate_inputs(x, y)
      batch_size, steps = dist_utils.process_batch_and_step_size(
          model._distribution_strategy, x, batch_size, steps, ModeKeys.TEST)
      batch_size = model._validate_or_infer_batch_size(batch_size, steps, x)
      dataset = model._distribution_standardize_user_data(
          x, y,
          sample_weight=sample_weight,
          batch_size=batch_size,
          allow_partial_batch=True)
  
      if dist_utils.is_tpu_strategy(model._distribution_strategy):
        steps = training_utils.infer_steps_for_dataset(
            model, dataset, steps, steps_name='steps')
        if steps is None:
          raise ValueError('Number of steps could not be inferred from the data, '
                           'please pass the steps argument.')
  
        if not context.executing_eagerly():
          # Run TPU evaluation in a custom loop in graph mode.
          return experimental_tpu_test_loop(
              model, dataset, verbose=verbose, steps=steps, callbacks=callbacks)
  
      return training_arrays.test_loop(
          model,
          inputs=dataset,
          batch_size=batch_size,
          verbose=verbose,
          steps=steps,
          callbacks=callbacks)
function_tokens: def evaluate ( self , model , x = None , y = None , batch_size = None , verbose = 1 , sample_weight = None , steps = None , callbacks = None , * * kwargs ) : dist_utils . validate_inputs ( x , y ) batch_size , steps = dist_utils . process_batch_and_step_size ( model . _distribution_strategy , x , batch_size , steps , ModeKeys . TEST ) batch_size = model . _validate_or_infer_batch_size ( batch_size , steps , x ) dataset = model . _distribution_standardize_user_data ( x , y , sample_weight = sample_weight , batch_size = batch_size , allow_partial_batch = True ) if dist_utils . is_tpu_strategy ( model . _distribution_strategy ) : steps = training_utils . infer_steps_for_dataset ( model , dataset , steps , steps_name = 'steps' ) if steps is None : raise ValueError ( 'Number of steps could not be inferred from the data, ' 'please pass the steps argument.' ) if not context . executing_eagerly ( ) : # Run TPU evaluation in a custom loop in graph mode. return experimental_tpu_test_loop ( model , dataset , verbose = verbose , steps = steps , callbacks = callbacks ) return training_arrays . test_loop ( model , inputs = dataset , batch_size = batch_size , verbose = verbose , steps = steps , callbacks = callbacks )