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
d2902b5d
Commit
d2902b5d
authored
Sep 21, 2022
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 475881500
parent
36a7e2db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
official/vision/tasks/semantic_segmentation.py
official/vision/tasks/semantic_segmentation.py
+4
-2
No files found.
official/vision/tasks/semantic_segmentation.py
View file @
d2902b5d
...
...
@@ -186,14 +186,16 @@ class SemanticSegmentationTask(base_task.Task):
if
self
.
task_config
.
model
.
get
(
'mask_scoring_head'
):
metrics
.
append
(
tf
.
keras
.
metrics
.
MeanSquaredError
(
name
=
'mask_scores_mse'
))
else
:
if
not
training
:
self
.
iou_metric
=
segmentation_metrics
.
PerClassIoU
(
name
=
'per_class_iou'
,
num_classes
=
self
.
task_config
.
model
.
num_classes
,
rescale_predictions
=
not
self
.
task_config
.
validation_data
.
resize_eval_groundtruth
,
dtype
=
tf
.
float32
)
if
self
.
task_config
.
validation_data
.
resize_eval_groundtruth
and
self
.
task_config
.
model
.
get
(
'mask_scoring_head'
):
# pylint: disable=line-too-long
if
(
self
.
task_config
.
validation_data
.
resize_eval_groundtruth
and
self
.
task_config
.
model
.
get
(
'mask_scoring_head'
)):
# Masks scores metric can only be computed if labels are scaled to match
# preticted mask scores.
metrics
.
append
(
...
...
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