def get_profiler_hook(model_dir, save_steps=1000, **kwargs):
    'Function to get ProfilerHook.\n\n  Args:\n    model_dir: The directory to save the profile traces to.\n    save_steps: `int`, print profile traces every N steps.\n    **kwargs: a dictionary of arguments to ProfilerHook.\n\n  Returns:\n    Returns a ProfilerHook that writes out timelines that can be loaded into\n    profiling tools like chrome://tracing.\n  '
    return tf.train.ProfilerHook(save_steps=save_steps, output_dir=model_dir)
Function to get ProfilerHook.

Args:
  model_dir: The directory to save the profile traces to.
  save_steps: `int`, print profile traces every N steps.
  **kwargs: a dictionary of arguments to ProfilerHook.

Returns:
  Returns a ProfilerHook that writes out timelines that can be loaded into
  profiling tools like chrome://tracing.
def get_profiler_hook(model_dir, save_steps=1000, **kwargs):
    'Function to get ProfilerHook.\n\n  Args:\n    model_dir: The directory to save the profile traces to.\n    save_steps: `int`, print profile traces every N steps.\n    **kwargs: a dictionary of arguments to ProfilerHook.\n\n  Returns:\n    Returns a ProfilerHook that writes out timelines that can be loaded into\n    profiling tools like chrome://tracing.\n  '
    return tf.train.ProfilerHook(save_steps=save_steps, output_dir=model_dir)