Softplus损失函数
- class SoftplusLoss(reduction: str = 'mean')[source]
-
逐点逻辑损失(即softplus损失)。
\[g(s, l) = \log(1 + \exp(-\hat{l} \cdot s))\]使用分数 \(s\) 和标签 \(l\),这些标签已经被重新缩放到 \(\hat{l} \in \{-1, 1\}\)。
另请参阅
这个类是
pykeen.losses.SoftPointwiseHingeLoss的一个特例,其中边距设置为margin=0。初始化损失。
- Parameters:
reduction (str) – 缩减方式,参见
SoftPointwiseHingeLoss.__init__()
属性摘要
优化损失超参数的默认策略
属性文档