Unverified Commit 8155eb9d authored by Yuefeng Zhou's avatar Yuefeng Zhou Committed by GitHub
Browse files

Add StepCounterHook to hooks_helper.py (#7134)

* Add StepCounterHook to hooks_helper.py

* Update symbol.
parent 680eb35c
......@@ -156,10 +156,17 @@ def get_logging_metric_hook(tensors_to_log=None,
every_n_secs=every_n_secs)
def get_step_counter_hook(**kwargs):
"""Function to get StepCounterHook."""
del kwargs
return tf.estimator.StepCounterHook()
# A dictionary to map one hook name and its corresponding function
HOOKS = {
'loggingtensorhook': get_logging_tensor_hook,
'profilerhook': get_profiler_hook,
'examplespersecondhook': get_examples_per_second_hook,
'loggingmetrichook': get_logging_metric_hook,
'stepcounterhook': get_step_counter_hook
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment