MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / softplus

Function softplus

mla/neuralnet/activations.py:23–27  ·  view source on GitHub ↗

Smooth relu.

(z)

Source from the content-addressed store, hash-verified

21
22
23def softplus(z):
24 """Smooth relu."""
25 # Avoid numerical overflow, see:
26 # https://docs.scipy.org/doc/numpy/reference/generated/numpy.logaddexp.html
27 return np.logaddexp(0.0, z)
28
29
30def softsign(z):

Callers 1

test_softplusFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_softplusFunction · 0.68