def compute(self):
    epsilon = 1e-08
    iou_by_classes = (self.total_iou_by_classes / (self.image_count_by_classes + epsilon))
    if self._by_classes:
        return iou_by_classes
    return torch.mean(iou_by_classes)
def compute(self):
    epsilon = 1e-08
    iou_by_classes = (self.total_iou_by_classes / (self.image_count_by_classes + epsilon))
    if self._by_classes:
        return iou_by_classes
    return torch.mean(iou_by_classes)