MCPcopy 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
375def relu6(x):
376 return clip(x, 0.0, 6.0).astype(x.dtype)
377
378
379def relu6_grad(x, dy):

Callers

nothing calls this directly

Calls 2

clipFunction · 0.50
astypeMethod · 0.45

Tested by

no test coverage detected