ConfidencePenaltyLoss#
- class torch_uncertainty.losses.ConfidencePenaltyLoss(reg_weight=1, reduction='mean', eps=1e-06)[source]#
The Confidence Penalty Loss.
- Parameters:
reg_weight (
float) – The weight of the regularization term.reduction (
str|None) – specifies the reduction to apply to the output:'none'|'mean'|'sum'. Defaults to “mean”.eps (
float) – A small value to avoid numerical instability. Defaults to1e-6.
References
[1] Gabriel Pereyra: Regularizing neural networks by penalizing confident output distributions.