def __call__(
        self, proposals_with_gt: List[Instances], densepose_predictor_outputs: Any
    ) -> torch.Tensor:
        """
        Computes segmentation loss as cross-entropy for raw unnormalized
        scores given ground truth labels.

        Args:
            proposals_with_gt (list of Instances): detections with associated ground truth data
            densepose_predictor_outputs: an object of a dataclass that contains predictor outputs
                with estimated values; assumed to have the following attribute:
                * coarse_segm (tensor of shape [N, D, S, S]): coarse segmentation estimates
                    as raw unnormalized scores
                where N is the number of detections, S is the estimate size ( = width = height)
                and D is the number of coarse segmentation channels.
        Return:
            Cross entropy for raw unnormalized scores for coarse segmentation given
            ground truth labels from masks
        """
        if not len(proposals_with_gt):
            return self.fake_value(densepose_predictor_outputs)
        # densepose outputs are computed for all images and all bounding boxes;
        # i.e. if a batch has 4 images with (3, 1, 2, 1) proposals respectively,
        # the outputs will have size(0) == 3+1+2+1 == 7
        with torch.no_grad():
            mask_loss_data = extract_data_for_mask_loss_from_matches(
                proposals_with_gt, densepose_predictor_outputs.coarse_segm
            )
        if (mask_loss_data.masks_gt is None) or (mask_loss_data.masks_est is None):
            return self.fake_value(densepose_predictor_outputs)
        return F.cross_entropy(mask_loss_data.masks_est, mask_loss_data.masks_gt.long())

        Computes segmentation loss as cross-entropy for raw unnormalized
        scores given ground truth labels.

        Args:
            proposals_with_gt (list of Instances): detections with associated ground truth data
            densepose_predictor_outputs: an object of a dataclass that contains predictor outputs
                with estimated values; assumed to have the following attribute:
                * coarse_segm (tensor of shape [N, D, S, S]): coarse segmentation estimates
                    as raw unnormalized scores
                where N is the number of detections, S is the estimate size ( = width = height)
                and D is the number of coarse segmentation channels.
        Return:
            Cross entropy for raw unnormalized scores for coarse segmentation given
            ground truth labels from masks
        
EVA-02/det/projects/DensePose/densepose/modeling/losses/mask.py