- class SoftPointwiseHingeLoss(margin=1.0, reduction='mean')[source]
The soft pointwise hinge loss.
This loss is appropriate for interaction functions which do not include a bias term, and have a limited value range, e.g., distance-based ones like TransE.
margin=0, this loss becomes equivalent to
pykeen.losses.SoftplusLoss. It is also closely related to
pykeen.losses.PointwiseHingeLoss, only differing in that this loss uses the softmax activation and
pykeen.losses.PointwiseHingeLossuses the ReLU activation.
Initialize the loss.
The default strategy for optimizing the loss's hyper-parameters