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
02571056
Unverified
Commit
02571056
authored
Jun 01, 2018
by
Yanhui Liang
Committed by
GitHub
Jun 01, 2018
Browse files
Fix the hooks test comments (#4427)
parent
d2d6ab4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
official/utils/logs/hooks_test.py
official/utils/logs/hooks_test.py
+4
-8
No files found.
official/utils/logs/hooks_test.py
View file @
02571056
...
...
@@ -32,14 +32,10 @@ tf.logging.set_verbosity(tf.logging.DEBUG)
class
ExamplesPerSecondHookTest
(
tf
.
test
.
TestCase
):
"""Tests for the ExamplesPerSecondHook.
In this test, we explicitly run global_step tensor after train_op in order to
grab the correct global step value. This is to correct for discrepancies in
reported global step when running on GPUs. As in the after_run functions in
ExamplesPerSecondHook, the global step from run_results
(global_step = run_values.results) is not always correct and taken as the
stale global_step (which may be 1 off the correct value). The exact
global_step value should be from run_context
(global_step = run_context.session.run(global_step_tensor)
In the test, we explicitly run global_step tensor after train_op in order to
keep the global_step value and the train_op (which increase the glboal_step
by 1) consistent. This is to correct the discrepancies in reported global_step
value when running on GPUs.
"""
def
setUp
(
self
):
...
...
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