SoftPointwiseHingeLoss
- class SoftPointwiseHingeLoss(margin=1.0, reduction='mean')[source]
Bases:
pykeen.losses.DeltaPointwiseLoss
A module for 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.
See also
When choosing
margin=0
, this loss becomes equivalent topykeen.losses.SoftplusLoss
. It is also closely related topykeen.losses.PointwiseHingeLoss
, only differing in that this loss uses the softmax activation andpykeen.losses.PointwiseHingeLoss
uses the ReLU activation.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