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
fffcd235
Commit
fffcd235
authored
May 21, 2020
by
Yeqing Li
Committed by
A. Unique TensorFlower
May 21, 2020
Browse files
Internal change
PiperOrigin-RevId: 312770722
parent
979e296a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
official/modeling/training/distributed_executor.py
official/modeling/training/distributed_executor.py
+8
-3
No files found.
official/modeling/training/distributed_executor.py
View file @
fffcd235
...
...
@@ -573,15 +573,20 @@ class DistributedExecutor(object):
test_iterator
,
metric
)
return
None
logging
.
info
(
'Running evaluation after step: %s.'
,
current_training_step
)
eval_step
=
0
while
True
:
try
:
test_step
(
test_iterator
)
with
tf
.
experimental
.
async_scope
():
test_step
(
test_iterator
)
eval_step
+=
1
except
(
StopIteration
,
tf
.
errors
.
OutOfRangeError
):
tf
.
experimental
.
async_clear_error
()
break
metric_result
=
metric_results
(
metric
)
logging
.
info
(
'Step: [%d] Validation metric = %f'
,
current_training_step
,
metric_result
)
logging
.
info
(
'Total eval steps: [%d]'
,
eval_step
)
logging
.
info
(
'At training step: [%r] Validation metric = %r'
,
current_training_step
,
metric_result
)
return
metric_result
def
evaluate_from_model_dir
(
...
...
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