Shortcuts

ConflictualLoss

class torch_uncertainty.losses.ConflictualLoss(reg_weight=1, reduction='mean')[source]

The Conflictual Loss.

Parameters:
  • reg_weight (float, optional) – The weight of the regularization term.

  • reduction (str, optional) – specifies the reduction to apply to the

  • output'none' | 'mean' | 'sum'.

Reference:

Mohammed Fellaji et al. On the Calibration of Epistemic Uncertainty: Principles, Paradoxes and Conflictual Loss.

forward(logits, targets)[source]

Compute the conflictual loss.

Parameters:
  • logits (Tensor) – The outputs of the model.

  • targets (Tensor) – The target values.

Returns:

The conflictual loss.

Return type:

Tensor