PointwiseHingeLoss
- class PointwiseHingeLoss(margin: float = 1.0, reduction: str = 'mean')[source]
Bases:
DeltaPointwiseLoss
The pointwise hinge loss.
\[g(s,l) = \max(0, \lambda -\hat{l}*s)\]with scores \(s\) and labels \(l\) that have been rescaled to \(\hat{l} \in \{-1, 1\}\).
Initialize the loss.
- Parameters:
Attributes Summary
The default strategy for optimizing the loss's hyper-parameters
Attributes Documentation