neural_tangents.stax.Sigmoid_like

neural_tangents.stax.Sigmoid_like()[source]

A sigmoid like function f(x) = .5 * erf(x / 2.4020563531719796) + .5.

The constant 2.4020563531719796 is chosen so that the squared loss between this function and the ground truth sigmoid is minimized on the interval [-5, 5]; see https://gist.github.com/SiuMath/679e8bb4bce13d5f2383a27eca649575.

Returns:

(init_fn, apply_fn, kernel_fn).