Skip to main content

softplus

Function softplus 

Source
pub fn softplus(x: f64) -> f64
Expand description

softplus(x) = ln(1 + e^x), evaluated as max(x, 0) + ln(1 + e^{-|x|}) so that neither tail overflows and the small-x result keeps full relative accuracy.