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

Function relu

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

r"""Applies the rectified linear unit function element-wise. See :class:`~.module.ReLU` for more details.

(x)

Source from the content-addressed store, hash-verified

859
860
861def relu(x):
862 r"""Applies the rectified linear unit function element-wise.
863
864 See :class:`~.module.ReLU` for more details.
865 """
866 return _elwise(x, mode=Elemwise.Mode.RELU)
867
868
869def relu6(x):

Callers 15

hinge_lossFunction · 0.70
forwardMethod · 0.50
_calc_linearMethod · 0.50
forwardMethod · 0.50
forwardMethod · 0.50
forwardMethod · 0.50
forwardMethod · 0.50
forwardMethod · 0.50
forwardMethod · 0.50
forwardMethod · 0.50
forwardMethod · 0.50
forwardMethod · 0.50

Calls 1

_elwiseFunction · 0.50

Tested by 13

fFunction · 0.40
run_testFunction · 0.40
TESTFunction · 0.40
TESTFunction · 0.40
TEST_PASSFunction · 0.40
TESTFunction · 0.40
TEST_PASSFunction · 0.40
run<expand_jit_executor>Function · 0.40
TESTFunction · 0.40