MCPcopy 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
430def silu(inp):
431 res = inp / (1.0 + exp(-inp))
432 return res.astype(inp.dtype)
433
434
435def silu_grad(x, dy):

Callers

nothing calls this directly

Calls 2

expFunction · 0.50
astypeMethod · 0.45

Tested by

no test coverage detected