parameters: (sess,
                 num_evals=1,
                 initial_op=None,
                 initial_op_feed_dict=None,
                 eval_op=None,
                 eval_op_feed_dict=None,
                 final_op=None,
                 final_op_feed_dict=None,
                 summary_op=None,
                 summary_op_feed_dict=None,
                 summary_writer=None,
                 global_step=None)
return_statement: return final_op_value
docstring: Performs a single evaluation run.
  
    A single evaluation consists of several steps run in the following order:
    (1) an initialization op, (2) an evaluation op which is executed `num_evals`
    times (3) a finalization op and (4) the execution of a summary op which is
    written out using a summary writer.
  
    Args:
      sess: The current TensorFlow `Session`.
      num_evals: The number of times to execute `eval_op`.
      initial_op: An operation run at the beginning of evaluation.
      initial_op_feed_dict: A feed dictionary to use when executing `initial_op`.
      eval_op: A operation run `num_evals` times.
      eval_op_feed_dict: The feed dictionary to use when executing the `eval_op`.
      final_op: An operation to execute after all of the `eval_op` executions. The
        value of `final_op` is returned.
      final_op_feed_dict: A feed dictionary to use when executing `final_op`.
      summary_op: A summary op executed after `eval_op` and `finalize_op`.
      summary_op_feed_dict: An optional feed dictionary to use when executing the
        `summary_op`.
      summary_writer: The summery writer used if `summary_op` is provided.
      global_step: the global step variable. If left as `None`, then
        slim.variables.global_step() is used.
  
    Returns:
      The value of `final_op` or `None` if `final_op` is `None`.
  
    Raises:
      ValueError: if `summary_op` is provided but `global_step` is `None`.
docstring_summary: Performs a single evaluation run.
docstring_tokens: Performs a single evaluation run .
function: def evaluation(sess,
                 num_evals=1,
                 initial_op=None,
                 initial_op_feed_dict=None,
                 eval_op=None,
                 eval_op_feed_dict=None,
                 final_op=None,
                 final_op_feed_dict=None,
                 summary_op=None,
                 summary_op_feed_dict=None,
                 summary_writer=None,
                 global_step=None):
    """Performs a single evaluation run.
  
    A single evaluation consists of several steps run in the following order:
    (1) an initialization op, (2) an evaluation op which is executed `num_evals`
    times (3) a finalization op and (4) the execution of a summary op which is
    written out using a summary writer.
  
    Args:
      sess: The current TensorFlow `Session`.
      num_evals: The number of times to execute `eval_op`.
      initial_op: An operation run at the beginning of evaluation.
      initial_op_feed_dict: A feed dictionary to use when executing `initial_op`.
      eval_op: A operation run `num_evals` times.
      eval_op_feed_dict: The feed dictionary to use when executing the `eval_op`.
      final_op: An operation to execute after all of the `eval_op` executions. The
        value of `final_op` is returned.
      final_op_feed_dict: A feed dictionary to use when executing `final_op`.
      summary_op: A summary op executed after `eval_op` and `finalize_op`.
      summary_op_feed_dict: An optional feed dictionary to use when executing the
        `summary_op`.
      summary_writer: The summery writer used if `summary_op` is provided.
      global_step: the global step variable. If left as `None`, then
        slim.variables.global_step() is used.
  
    Returns:
      The value of `final_op` or `None` if `final_op` is `None`.
  
    Raises:
      ValueError: if `summary_op` is provided but `global_step` is `None`.
    """
    if initial_op is not None:
      logging.info('Executing initial eval op')
      sess.run(initial_op, initial_op_feed_dict)
  
    if eval_op is not None:
      logging.info('Executing eval ops')
      for i in range(int(num_evals)):
        logging.info('Executing eval_op %d/%d', i + 1, num_evals)
        sess.run(eval_op, eval_op_feed_dict)
  
    if final_op is not None:
      logging.info('Executing final op')
      final_op_value = sess.run(final_op, final_op_feed_dict)
    else:
      final_op_value = None
  
    if summary_op is not None:
      logging.info('Executing summary op')
      if global_step is None:
        global_step = variables.get_or_create_global_step()
  
      global_step = training_util.global_step(sess, global_step)
      summary = sess.run(summary_op, summary_op_feed_dict)
      summary_writer.add_summary(summary, global_step)
      summary_writer.flush()
  
    return final_op_value
function_tokens: def evaluation ( sess , num_evals = 1 , initial_op = None , initial_op_feed_dict = None , eval_op = None , eval_op_feed_dict = None , final_op = None , final_op_feed_dict = None , summary_op = None , summary_op_feed_dict = None , summary_writer = None , global_step = None ) : if initial_op is not None : logging . info ( 'Executing initial eval op' ) sess . run ( initial_op , initial_op_feed_dict ) if eval_op is not None : logging . info ( 'Executing eval ops' ) for i in range ( int ( num_evals ) ) : logging . info ( 'Executing eval_op %d/%d' , i + 1 , num_evals ) sess . run ( eval_op , eval_op_feed_dict ) if final_op is not None : logging . info ( 'Executing final op' ) final_op_value = sess . run ( final_op , final_op_feed_dict ) else : final_op_value = None if summary_op is not None : logging . info ( 'Executing summary op' ) if global_step is None : global_step = variables . get_or_create_global_step ( ) global_step = training_util . global_step ( sess , global_step ) summary = sess . run ( summary_op , summary_op_feed_dict ) summary_writer . add_summary ( summary , global_step ) summary_writer . flush ( ) return final_op_value