Skip to content

Commit 80c341f

Browse files
Add legacy user of //third_party/tensorflow/compiler/jit.
PiperOrigin-RevId: 733016653
1 parent 51884cf commit 80c341f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

official/projects/panoptic/tasks/panoptic_maskrcnn.py

+2
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ def aggregate_logs(self, state=None, step_outputs=None):
446446

447447
def _reduce_semantic_metrics(self, logs: Dict[str, Any]):
448448
"""Updates the per class and mean semantic metrics in the logs."""
449+
assert self.segmentation_perclass_iou_metric is not None
449450
ious = self.segmentation_perclass_iou_metric.result()
450451
if self.task_config.segmentation_evaluation.report_per_class_iou:
451452
for i, value in enumerate(ious.numpy()):
@@ -454,6 +455,7 @@ def _reduce_semantic_metrics(self, logs: Dict[str, Any]):
454455

455456
def _reduce_panoptic_metrics(self, logs: Dict[str, Any]):
456457
"""Updates the per class and mean panoptic metrics in the logs."""
458+
assert self.panoptic_quality_metric is not None
457459
result = self.panoptic_quality_metric.result()
458460
valid_thing_classes = result['valid_thing_classes']
459461
valid_stuff_classes = result['valid_stuff_classes']

0 commit comments

Comments
 (0)