def forward(self, head_outputs: torch.Tensor):
        """
        Perform forward operation on head outputs used as inputs for the predictor.
        Calls forward method from the base predictor and uses its outputs to compute
        confidences.

        Args:
            head_outputs (Tensor): head outputs used as predictor inputs
        Return:
            An instance of outputs with confidences,
            see `decorate_predictor_output_class_with_confidences`
        """
        # assuming base class returns SIUV estimates in its first result
        base_predictor_outputs = super().forward(head_outputs)  # pyre-ignore[16]

        # create output instance by extending base predictor outputs:
        output = self._create_output_instance(base_predictor_outputs)

        if self.confidence_model_cfg.uv_confidence.enabled:
            if self.confidence_model_cfg.uv_confidence.type == DensePoseUVConfidenceType.IID_ISO:
                # assuming base class defines interp2d method for bilinear interpolation
                output.sigma_2 = self.interp2d(self.sigma_2_lowres(head_outputs))  # pyre-ignore[16]
            elif (
                self.confidence_model_cfg.uv_confidence.type
                == DensePoseUVConfidenceType.INDEP_ANISO
            ):
                # assuming base class defines interp2d method for bilinear interpolation
                output.sigma_2 = self.interp2d(self.sigma_2_lowres(head_outputs))
                output.kappa_u = self.interp2d(self.kappa_u_lowres(head_outputs))  # pyre-ignore[16]
                output.kappa_v = self.interp2d(self.kappa_v_lowres(head_outputs))  # pyre-ignore[16]
            else:
                raise ValueError(
                    f"Unknown confidence model type: "
                    f"{self.confidence_model_cfg.confidence_model_type}"
                )
        if self.confidence_model_cfg.segm_confidence.enabled:
            # base predictor outputs are assumed to have `fine_segm` and `coarse_segm` attributes
            # base predictor is assumed to define `interp2d` method for bilinear interpolation
            output.fine_segm_confidence = (
                F.softplus(
                    self.interp2d(self.fine_segm_confidence_lowres(head_outputs))  # pyre-ignore[16]
                )
                + self.confidence_model_cfg.segm_confidence.epsilon
            )
            output.fine_segm = base_predictor_outputs.fine_segm * torch.repeat_interleave(
                output.fine_segm_confidence, base_predictor_outputs.fine_segm.shape[1], dim=1
            )
            output.coarse_segm_confidence = (
                F.softplus(
                    self.interp2d(
                        self.coarse_segm_confidence_lowres(head_outputs)  # pyre-ignore[16]
                    )
                )
                + self.confidence_model_cfg.segm_confidence.epsilon
            )
            output.coarse_segm = base_predictor_outputs.coarse_segm * torch.repeat_interleave(
                output.coarse_segm_confidence, base_predictor_outputs.coarse_segm.shape[1], dim=1
            )

        return output

        Perform forward operation on head outputs used as inputs for the predictor.
        Calls forward method from the base predictor and uses its outputs to compute
        confidences.

        Args:
            head_outputs (Tensor): head outputs used as predictor inputs
        Return:
            An instance of outputs with confidences,
            see `decorate_predictor_output_class_with_confidences`
        
EVA-02/det/projects/DensePose/densepose/modeling/predictors/chart_confidence.py