class_docstr: Hook to print out examples per second.
  
  Total time is tracked and then divided by the total number of steps
  to get the average step time and then batch_size is used to determine
  the running average of examples per second. The examples per second for the
  most recent interval is also logged.
class_docstr_tok: ["Hook","to","print","out","examples","per","second",".","Total","time","is","tracked","and","then","divided","by","the","total","number","of","steps","to","get","the","average","step","time","and","then","batch_size","is","used","to","determine","the","running","average","of","examples","per","second",".","The","examples","per","second","for","the","most","recent","interval","is","also","logged","."]
code: def after_run(self, run_context, run_values):
      _ = run_context
  
      global_step = run_values.results
      if self._timer.should_trigger_for_step(global_step):
          (
              elapsed_time,
              elapsed_steps,
          ) = self._timer.update_last_triggered_step(global_step)
          if elapsed_time is not None:
              steps_per_sec = elapsed_steps / elapsed_time
              self._step_train_time += elapsed_time
              self._total_steps += elapsed_steps
  
              average_examples_per_sec = self._batch_size * (
                  self._total_steps / self._step_train_time
              )
              current_examples_per_sec = (
                  steps_per_sec * self._batch_size
              )
              # Average examples/sec followed by current examples/sec
              logging.info(
                  "%s: %g (%g), step = %g",
                  "Average examples/sec",
                  average_examples_per_sec,
                  current_examples_per_sec,
                  self._total_steps,
              )
  
imports: import collections
  import six
  import tensorflow
  from tensorflow.python.platform import tf_logging
  from tensorflow.core.framework import node_def_pb2
  from tensorflow.python.framework import device
  from tensorflow.python.training import basic_session_run_hooks
  from tensorflow.python.training import session_run_hook
  from tensorflow.python.training import training_util
  from tensorflow.python.training import device_setter
  from tensorflow.contrib.learn.python.learn import run_config
label_desc: Use image node_id 4 for calling the ExamplesPerSecondHook obj's underlying member method code with example usage: obj.after_run(run_context, run_values) without return types