PointwiseHingeLoss
- class PointwiseHingeLoss(margin=1.0, reduction='mean')[source]
Bases:
pykeen.losses.DeltaPointwiseLoss
A module for 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\}\).
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Attributes Summary
The default strategy for optimizing the loss's hyper-parameters
Attributes Documentation