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
98074f7a
Commit
98074f7a
authored
Apr 07, 2020
by
Ruoxin Sang
Committed by
A. Unique TensorFlower
Apr 07, 2020
Browse files
Remove workaround to make eval iterator as a class member.
PiperOrigin-RevId: 305378415
parent
2ff0a3fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
official/staging/training/standard_runnable.py
official/staging/training/standard_runnable.py
+2
-5
No files found.
official/staging/training/standard_runnable.py
View file @
98074f7a
...
@@ -139,13 +139,10 @@ class StandardEvaluable(runnable.AbstractEvaluable):
...
@@ -139,13 +139,10 @@ class StandardEvaluable(runnable.AbstractEvaluable):
eval_fn
=
tf
.
function
(
eval_fn
)
eval_fn
=
tf
.
function
(
eval_fn
)
self
.
eval_loop_fn
=
utils
.
create_loop_fn
(
eval_fn
)
self
.
eval_loop_fn
=
utils
.
create_loop_fn
(
eval_fn
)
# TODO(b/147718615): When async RPC is enabled in eager runtime, we make
eval_iter
=
tf
.
nest
.
map_structure
(
iter
,
self
.
eval_dataset
)
# eval iterator as a class member so it doesn't get destroyed when out of
# the function scope.
self
.
eval_iter
=
tf
.
nest
.
map_structure
(
iter
,
self
.
eval_dataset
)
self
.
eval_begin
()
self
.
eval_begin
()
self
.
eval_loop_fn
(
self
.
eval_iter
,
num_steps
)
self
.
eval_loop_fn
(
eval_iter
,
num_steps
)
return
self
.
eval_end
()
return
self
.
eval_end
()
def
eval_begin
(
self
):
def
eval_begin
(
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