快捷方式

torch.nn.functional.softplus

torch.nn.functional.softplus(input, beta=1, threshold=20) Tensor

逐元素地应用函数 Softplus(x)=1βlog(1+exp(βx))\text{Softplus}(x) = \frac{1}{\beta} * \log(1 + \exp(\beta * x))

为了数值稳定性,当 input×β>thresholdinput \times \beta > threshold 时,该实现会恢复为线性函数。

有关更多详细信息,请参阅 Softplus

文档

访问 PyTorch 的综合开发者文档

查看文档

教程

获取面向初学者和高级开发者的深度教程

查看教程

资源

查找开发资源并获得问题解答

查看资源