The softplus is a smooth version of ReLU, and it appears throughout mutual information estimators. Written naively, exp overflows for large inputs, so a stable form is needed.
Implement softplus(x), returning log(1 + exp(x)).
exp(x) directly for large x.Use np.logaddexp(0, x), which evaluates the same quantity stably.
No results yet
Run your code to check it against the examples, or submit to run every test.