Learn R Programming

polykde (version 1.1.7)

softplus: Stable computation of the softplus function

Description

Computes the softplus function \(\log(1+e^{t})\) in a numerically stable way for large absolute values of \(t\).

Usage

softplus(t)

Value

The softplus function evaluated at t.

Arguments

t

vector or matrix.

Examples

Run this code
curve(softplus(10 * (1 - (1 - x) / 0.1)), from = -1, to = 1)

Run the code above in your browser using DataLab