Softplus Activation Function
Examples
softplus(c(-1, 0, 1, 2))
#> [1] 0.3132617 0.6931472 1.3132617 2.1269280
# You can use rxode2 too:
r <- rxode2({
s <- softplus(time)
})
#>
#>
#> using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.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 s
#> <dbl> <dbl>
#> 1 -1 0.313
#> 2 0 0.693
#> 3 1 1.31
#> 4 2 2.13