MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / softplus

Function softplus

imperative/python/megengine/xla/rules/elemwise.py:403–404  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

401
402
403def softplus(x):
404 return log1p(exp(-abs(x))) + relu(x)
405
406
407def softplus_grad(x, dy):

Callers

nothing calls this directly

Calls 4

reluFunction · 0.70
log1pFunction · 0.50
expFunction · 0.50
absFunction · 0.50

Tested by

no test coverage detected