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 以取得更多詳細資訊。