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
42f8e96e
Commit
42f8e96e
authored
Nov 13, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Nov 13, 2020
Browse files
Change self.global_step.numpy() != expected_step as logging.warning.
PiperOrigin-RevId: 342276315
parent
db4acd91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
orbit/controller.py
orbit/controller.py
+4
-3
No files found.
orbit/controller.py
View file @
42f8e96e
...
...
@@ -189,7 +189,6 @@ class Controller:
tf
.
summary
.
experimental
.
set_step
(
self
.
global_step
)
# Restores the model if needed.
# TODO(momernick): We probably only want to do this on certain occasions?
if
self
.
checkpoint_manager
is
not
None
:
restored_path
=
self
.
restore_checkpoint
()
if
restored_path
:
...
...
@@ -417,12 +416,14 @@ class Controller:
# Verify that global_step was updated properly, then update current_step.
expected_step
=
current_step
+
num_steps
if
self
.
global_step
.
numpy
()
!=
expected_step
:
raise
RuntimeError
(
message
=
(
f
"`trainer.train(
{
num_steps
}
)` did not update `global_step` by "
f
"
{
num_steps
}
. Old value was
{
current_step
}
, expected updated value "
f
"to be
{
expected_step
}
, but it was
{
self
.
global_step
.
numpy
()
}
."
)
current_step
=
expected_step
logging
.
warning
(
message
)
return
current_step
=
expected_step
steps_per_second
=
self
.
step_timer
.
steps_per_second
()
_log
(
f
"train | step:
{
current_step
:
6
d
}
| "
f
"steps/sec:
{
steps_per_second
:
6.1
f
}
| "
...
...
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