Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
397
def
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
403
def
softplus(x):
Callers
nothing calls this directly
Calls
5
where
Function · 0.70
log1p
Function · 0.50
exp
Function · 0.50
abs
Function · 0.50
astype
Method · 0.45
Tested by
no test coverage detected