def METHOD_NAME(self):
    ignore_index = 2
    predictions = self._get_default_predictions_tensor(0.0)
    # only label 0 is predicted as positive.
    predictions[:, 0] = 1.0
    target = self._get_default_target_zeroes_tensor()
    # half target with label 0, quarter with 1 and quarter with ignore.
    target[:, : self.img_size // 2, : self.img_size // 2] = 1
    target[:, : self.img_size // 2, self.img_size // 2 :] = ignore_index
    # ignore samples are excluded in both intersection and union.
    intersection = torch.tensor([0.5, 0.0])
    union = torch.tensor([0.75, 0.25])
    expected_iou_loss = 1.0 - (intersection / (union + self.eps))
    expected_iou_loss = expected_iou_loss.mean()
    criterion = IoULoss(smooth=0, eps=self.eps, apply_softmax=False, ignore_index=ignore_index)
    iou_loss = criterion(predictions, target)
    self._assertion_iou_torch_values(expected_iou_loss, iou_loss)