parameters: (self, dataset, *args, **kwargs)
return_statement: return (init_op, call_op, results_op)
docstring: Convenience method for performing an eval on a Dataset.
  
      Args:
        dataset: Dataset object with the input data to evaluate on.
        *args:
        **kwargs: Optional additional arguments to __call__(), except
          `summary_logdir`: if specified, metrics will be written as summaries
          to this directory.
  
      Returns:
        @compatibility(eager)
        When eager execution is enabled, this returns the result of performing
        an evaluation as a dictionary. With graph execution, this returns a tuple
        (init_op, call_op, results_op) which may be executed using this code:
        ```python
          sess.run(init_op)
          try:
            while True:
              sess.run(call_op)
          except tf.errors.OutOfRangeError:
            pass
          return sess.run(results_op)  # A dictionary
  
          # equivalently:
          return evaluator.run_evaluation(init_op, call_op, results_op, sess=sess)
        ```
        @end_compatibility
docstring_summary: Convenience method for performing an eval on a Dataset.
docstring_tokens: Convenience method for performing an eval on a Dataset .
function: def evaluate_on_dataset(self, dataset, *args, **kwargs):
      """Convenience method for performing an eval on a Dataset.
  
      Args:
        dataset: Dataset object with the input data to evaluate on.
        *args:
        **kwargs: Optional additional arguments to __call__(), except
          `summary_logdir`: if specified, metrics will be written as summaries
          to this directory.
  
      Returns:
        @compatibility(eager)
        When eager execution is enabled, this returns the result of performing
        an evaluation as a dictionary. With graph execution, this returns a tuple
        (init_op, call_op, results_op) which may be executed using this code:
        ```python
          sess.run(init_op)
          try:
            while True:
              sess.run(call_op)
          except tf.errors.OutOfRangeError:
            pass
          return sess.run(results_op)  # A dictionary
  
          # equivalently:
          return evaluator.run_evaluation(init_op, call_op, results_op, sess=sess)
        ```
        @end_compatibility
      """
      summary_logdir = kwargs.pop("summary_logdir", None)
      if context.executing_eagerly():
        for example in datasets.Iterator(dataset):
          self.__call__(example, *args, **kwargs)
        return self.all_metric_results(summary_logdir)
      # Graph construction
      next_value = dataset_ops.make_one_shot_iterator(dataset).get_next()
      # Function inlining destroys strict inputs semantics (function body might
      # start execution before all inputs are ready). When iterator is exhausted
      # and throws out of range error, function body might be partially executed.
      # To prevent this we add an explicit control dependency from the 'get_next'.
      with ops.control_dependencies([next_value]):
        has_next_value = control_flow_ops.no_op(name="iterator_has_next")
      with ops.control_dependencies([has_next_value]):
        call_op = self.__call__(next_value, *args, **kwargs)
      init_op = self.init_variables()
      results_op = self.all_metric_results(summary_logdir)
      return (init_op, call_op, results_op)
function_tokens: def evaluate_on_dataset ( self , dataset , * args , * * kwargs ) : summary_logdir = kwargs . pop ( "summary_logdir" , None ) if context . executing_eagerly ( ) : for example in datasets . Iterator ( dataset ) : self . __call__ ( example , * args , * * kwargs ) return self . all_metric_results ( summary_logdir ) # Graph construction next_value = dataset_ops . make_one_shot_iterator ( dataset ) . get_next ( ) # Function inlining destroys strict inputs semantics (function body might # start execution before all inputs are ready). When iterator is exhausted # and throws out of range error, function body might be partially executed. # To prevent this we add an explicit control dependency from the 'get_next'. with ops . control_dependencies ( [ next_value ] ) : has_next_value = control_flow_ops . no_op ( name = "iterator_has_next" ) with ops . control_dependencies ( [ has_next_value ] ) : call_op = self . __call__ ( next_value , * args , * * kwargs ) init_op = self . init_variables ( ) results_op = self . all_metric_results ( summary_logdir ) return ( init_op , call_op , results_op )