SoftplusLoss
- class SoftplusLoss(reduction='mean')[source]
Bases:
pykeen.losses.SoftPointwiseHingeLossA module for the pointwise logistic loss (i.e., softplus loss).
\[g(s, l) = \log(1 + \exp(-\hat{l} \cdot s))\]with scores \(s\) and labels \(l\) that have been rescaled to \(\hat{l} \in \{-1, 1\}\).
See also
This class is a special case of
pykeen.losses.SoftPointwiseHingeLosswhere the margin is set tomargin=0.Initializes internal Module state, shared by both nn.Module and ScriptModule.