Skip to contents

Default Softplus Activation Function

Usage

dsoftplus(x)

d2softplus(x)

d3softplus(x)

d4softplus(x)

Arguments

x

numeric vector

Value

numeric vector

See also

Other Activation Functions: ELU(), GELU(), PReLU(), ReLU(), SELU(), Swish(), dELU(), dGELU(), dPReLU(), dReLU(), dSELU(), dSwish(), dlReLU(), lReLU(), softplus()

Author

Matthew L. Fidler

Examples


dsoftplus(c(-1, 0, 1, 2))
#> [1] 0.2689414 0.5000000 0.7310586 0.8807971

# You can use rxode2 too:

r <- rxode2({
 s1 <- dsoftplus(time)
})
#>  
#>  
#> using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’

e <- et(c(-1, 0, 1, 2))

rxSolve(r, e)
#> ── Solved rxode2 object ──
#> ── Parameters (value$params): ──
#> # A tibble: 1 × 0
#> ── Initial Conditions (value$inits): ──
#> named numeric(0)
#> ── First part of data (object): ──
#> # A tibble: 4 × 2
#>    time    s1
#>   <dbl> <dbl>
#> 1    -1 0.269
#> 2     0 0.5  
#> 3     1 0.731
#> 4     2 0.881