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

Function logsigmoid

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

Source from the content-addressed store, hash-verified

395
396
397def logsigmoid(x):
398 from .tensor import where
399
400 return -log1p(exp(-abs(x))) + where(x >= 0.0, 0.0, x).astype(x.dtype)
401
402
403def softplus(x):

Callers

nothing calls this directly

Calls 5

whereFunction · 0.70
log1pFunction · 0.50
expFunction · 0.50
absFunction · 0.50
astypeMethod · 0.45

Tested by

no test coverage detected