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
70097a35
Commit
70097a35
authored
Aug 18, 2017
by
Xinchen Yan
Committed by
Reed
Aug 18, 2017
Browse files
bugfix for missing function rotator_metrics (#2251)
parent
527609e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
ptn/model_rotator.py
ptn/model_rotator.py
+28
-2
No files found.
ptn/model_rotator.py
View file @
70097a35
...
@@ -190,8 +190,34 @@ def get_train_op_for_scope(loss, optimizer, scopes, params):
...
@@ -190,8 +190,34 @@ def get_train_op_for_scope(loss, optimizer, scopes, params):
def
get_metrics
(
inputs
,
outputs
,
params
):
def
get_metrics
(
inputs
,
outputs
,
params
):
names_to_values
,
names_to_updates
=
metrics
.
rotator_metrics
(
"""Aggregate the metrics for rotator model.
inputs
,
outputs
,
params
)
Args:
inputs: Input dictionary of the rotator model.
outputs: Output dictionary returned by the rotator model.
params: Hyperparameters of the rotator model.
Returns:
names_to_values: metrics->values (dict).
names_to_updates: metrics->ops (dict).
"""
names_to_values
=
dict
()
names_to_updates
=
dict
()
tmp_values
,
tmp_updates
=
metrics
.
add_image_pred_metrics
(
inputs
,
outputs
,
params
.
num_views
,
3
*
params
.
image_size
**
2
)
names_to_values
.
update
(
tmp_values
)
names_to_updates
.
update
(
tmp_updates
)
tmp_values
,
tmp_updates
=
metrics
.
add_mask_pred_metrics
(
inputs
,
outputs
,
params
.
num_views
,
params
.
image_size
**
2
)
names_to_values
.
update
(
tmp_values
)
names_to_updates
.
update
(
tmp_updates
)
for
name
,
value
in
names_to_values
.
iteritems
():
slim
.
summaries
.
add_scalar_summary
(
value
,
name
,
prefix
=
'eval'
,
print_summary
=
True
)
return
names_to_values
,
names_to_updates
return
names_to_values
,
names_to_updates
...
...
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