快捷方式

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 全面的开发者文档

查看文档

教程

获取针对初学者和高级开发者的深度教程

查看教程

资源

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

查看资源