Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


torch (version 0.0.3)

nnf_softplus: Softplus

Description

Applies element-wise, the function Softplus(x)=1/βlog(1+exp(βx)).

Usage

nnf_softplus(input, beta = 1, threshold = 20)

Arguments

input

(N,*) tensor, where * means, any number of additional dimensions

beta

the beta value for the Softplus formulation. Default: 1

threshold

values above this revert to a linear function. Default: 20

Details

For numerical stability the implementation reverts to the linear function when inputβ>threshold.