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
6f22f08d
Commit
6f22f08d
authored
Nov 30, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
Nov 30, 2020
Browse files
Internal change
PiperOrigin-RevId: 344836089
parent
8c248a5a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
official/core/train_utils.py
official/core/train_utils.py
+1
-1
No files found.
official/core/train_utils.py
View file @
6f22f08d
...
@@ -101,7 +101,7 @@ class BestCheckpointExporter:
...
@@ -101,7 +101,7 @@ class BestCheckpointExporter:
eval_logs_ext
=
copy
.
copy
(
eval_logs
)
eval_logs_ext
=
copy
.
copy
(
eval_logs
)
eval_logs_ext
[
'best_ckpt_global_step'
]
=
global_step
eval_logs_ext
[
'best_ckpt_global_step'
]
=
global_step
for
name
,
value
in
eval_logs_ext
.
items
():
for
name
,
value
in
eval_logs_ext
.
items
():
eval_logs_ext
[
name
]
=
str
(
orbit
.
utils
.
get_value
(
value
))
eval_logs_ext
[
name
]
=
float
(
orbit
.
utils
.
get_value
(
value
))
# Saving json file is very fast.
# Saving json file is very fast.
with
tf
.
io
.
gfile
.
GFile
(
self
.
best_ckpt_logs_path
,
'w'
)
as
writer
:
with
tf
.
io
.
gfile
.
GFile
(
self
.
best_ckpt_logs_path
,
'w'
)
as
writer
:
writer
.
write
(
json
.
dumps
(
eval_logs_ext
,
indent
=
4
)
+
'
\n
'
)
writer
.
write
(
json
.
dumps
(
eval_logs_ext
,
indent
=
4
)
+
'
\n
'
)
...
...
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