e3x.nn.activations.shifted_softplus
- e3x.nn.activations.shifted_softplus(x)[source]
Shifted-softplus activation function.
Computes the gated linear activation with:
\[\mathrm{gate}(x) = \frac{\log\left(\frac{1}{2}(1 + e^x)\right)}{x}\]For scalar inputs, this is equivalent to:
\[\mathrm{shifted\_softplus}(x) = \log\left(\frac{1}{2}(1 + e^x)\right)\]- Parameters:
x (
Union[Float[Array, '... 1 (max_degree+1)**2 num_features'], Float[Array, '... 2 (max_degree+1)**2 num_features']]) – Input features to which the nonlinearity is applied.- Return type:
- Returns:
The result of applying the nonlinearity to the input features.