Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ relu6
Function
relu6
imperative/python/megengine/xla/rules/elemwise.py:375–376 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
373
374
375
def
relu6(x):
376
return
clip(x, 0.0, 6.0).astype(x.dtype)
377
378
379
def
relu6_grad(x, dy):
Callers
nothing calls this directly
Calls
2
clip
Function · 0.50
astype
Method · 0.45
Tested by
no test coverage detected