Default Softplus Activation Function
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