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

Function silu

imperative/python/megengine/functional/nn.py:887–889  ·  view source on GitHub ↗

r"""Applies the element-wise Sigmoid Linear Unit function, i.e. `x * sigmoid(x)`.

(x)

Source from the content-addressed store, hash-verified

885
886
887def silu(x):
888 r"""Applies the element-wise Sigmoid Linear Unit function, i.e. `x * sigmoid(x)`."""
889 return _elwise(x, mode=Elemwise.Mode.SILU)
890
891
892def gelu(x):

Callers 1

forwardMethod · 0.50

Calls 1

_elwiseFunction · 0.50

Tested by

no test coverage detected