Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
8155eb9d
Unverified
Commit
8155eb9d
authored
Jul 02, 2019
by
Yuefeng Zhou
Committed by
GitHub
Jul 02, 2019
Browse files
Add StepCounterHook to hooks_helper.py (#7134)
* Add StepCounterHook to hooks_helper.py * Update symbol.
parent
680eb35c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
official/utils/logs/hooks_helper.py
official/utils/logs/hooks_helper.py
+7
-0
No files found.
official/utils/logs/hooks_helper.py
View file @
8155eb9d
...
...
@@ -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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment