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))Softplus(x)=β1∗log(1+exp(β∗x))。 为了数值稳定性,当 input×β>thresholdinput \times \beta > thresholdinput×β>threshold 时,实现会回退到线性函数。 更多细节请参阅 Softplus。
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))Softplus(x)=β1∗log(1+exp(β∗x))。 为了数值稳定性,当 input×β>thresholdinput \times \beta > thresholdinput×β>threshold 时,实现会回退到线性函数。 更多细节请参阅 Softplus。