評價此頁

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