def METHOD_NAME(self):
    weight = torch.tensor([0.25, 0.66])
    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, the other half with 1.
    target[:, : self.img_size // 2] = 1
    intersection = torch.tensor([0.5, 0.0])
    denominator = torch.tensor([1.5, 0.5])
    expected_dice_loss = 1.0 - ((2.0 * intersection) / (denominator + self.eps))
    expected_dice_loss *= weight
    expected_dice_loss = expected_dice_loss.mean()
    criterion = DiceLoss(smooth=0, eps=self.eps, apply_softmax=False, weight=weight)
    dice_loss = criterion(predictions, target)
    self._assertion_dice_torch_values(expected_dice_loss, dice_loss)