Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ silu
Function
silu
imperative/python/megengine/xla/rules/elemwise.py:430–432 ·
view source on GitHub ↗
(inp)
Source
from the content-addressed store, hash-verified
428
429
430
def
silu(inp):
431
res = inp / (1.0 + exp(-inp))
432
return
res.astype(inp.dtype)
433
434
435
def
silu_grad(x, dy):
Callers
nothing calls this directly
Calls
2
exp
Function · 0.50
astype
Method · 0.45
Tested by
no test coverage detected