def get_examples_per_second_hook(every_n_steps=100, batch_size=128, warm_steps=5, **kwargs):
    'Function to get ExamplesPerSecondHook.\n\n  Args:\n    every_n_steps: `int`, print current and average examples per second every\n      N steps.\n    batch_size: `int`, total batch size used to calculate examples/second from\n      global time.\n    warm_steps: skip this number of steps before logging and running average.\n    **kwargs: a dictionary of arguments to ExamplesPerSecondHook.\n\n  Returns:\n    Returns a ProfilerHook that writes out timelines that can be loaded into\n    profiling tools like chrome://tracing.\n  '
    return hooks.ExamplesPerSecondHook(batch_size=batch_size, every_n_steps=every_n_steps, warm_steps=warm_steps, metric_logger=logger.get_benchmark_logger())
Function to get ExamplesPerSecondHook.

Args:
  every_n_steps: `int`, print current and average examples per second every
    N steps.
  batch_size: `int`, total batch size used to calculate examples/second from
    global time.
  warm_steps: skip this number of steps before logging and running average.
  **kwargs: a dictionary of arguments to ExamplesPerSecondHook.

Returns:
  Returns a ProfilerHook that writes out timelines that can be loaded into
  profiling tools like chrome://tracing.
def get_examples_per_second_hook(every_n_steps=100, batch_size=128, warm_steps=5, **kwargs):
    'Function to get ExamplesPerSecondHook.\n\n  Args:\n    every_n_steps: `int`, print current and average examples per second every\n      N steps.\n    batch_size: `int`, total batch size used to calculate examples/second from\n      global time.\n    warm_steps: skip this number of steps before logging and running average.\n    **kwargs: a dictionary of arguments to ExamplesPerSecondHook.\n\n  Returns:\n    Returns a ProfilerHook that writes out timelines that can be loaded into\n    profiling tools like chrome://tracing.\n  '
    return hooks.ExamplesPerSecondHook(batch_size=batch_size, every_n_steps=every_n_steps, warm_steps=warm_steps, metric_logger=logger.get_benchmark_logger())