softplus function

double softplus(
  1. double x
)

Similar to ReLU, but there is a smooth (soft) curve as the result approaches zero on the negative x-axis. Softplus is strictly positive and monotonic.

Implementation

double softplus(double x) => log(exp(x) + 1);