Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ relu6
Function
relu6
imperative/python/megengine/functional/nn.py:869–871 ·
view source on GitHub ↗
r"""Element-wise `min(max(x, 0), 6)`.
(x)
Source
from the content-addressed store, hash-verified
867
868
869
def
relu6(x):
870
r
""
"Element-wise `min(max(x, 0), 6)`."
""
871
return
_elwise(x, mode=Elemwise.Mode.RELU6)
872
873
874
def
prelu(x, y):
Callers
nothing calls this directly
Calls
1
_elwise
Function · 0.50
Tested by
no test coverage detected