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
2151c447
Commit
2151c447
authored
Apr 11, 2018
by
Zhichao Lu
Committed by
pkulzc
Apr 13, 2018
Browse files
Enforcing that all eval metric ops have valid python strings.
PiperOrigin-RevId: 192485456
parent
0940134e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
research/object_detection/model_lib.py
research/object_detection/model_lib.py
+2
-1
No files found.
research/object_detection/model_lib.py
View file @
2151c447
...
...
@@ -365,10 +365,11 @@ def create_model_fn(detection_model_fn, configs, hparams, use_tpu=False):
for
loss_key
,
loss_tensor
in
iter
(
losses_dict
.
items
()):
eval_metric_ops
[
loss_key
]
=
tf
.
metrics
.
mean
(
loss_tensor
)
for
var
in
optimizer_summary_vars
:
eval_metric_ops
[
str
(
var
.
op
.
name
)
]
=
(
var
,
tf
.
no_op
())
eval_metric_ops
[
var
.
op
.
name
]
=
(
var
,
tf
.
no_op
())
if
img_summary
is
not
None
:
eval_metric_ops
[
'Detections_Left_Groundtruth_Right'
]
=
(
img_summary
,
tf
.
no_op
())
eval_metric_ops
=
{
str
(
k
):
v
for
k
,
v
in
eval_metric_ops
.
iteritems
()}
if
use_tpu
:
return
tf
.
contrib
.
tpu
.
TPUEstimatorSpec
(
...
...
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