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

Function cb1

imperative/python/test/unit/xla/test_xla_training.py:312–315  ·  view source on GitHub ↗
(_, grad)

Source from the content-addressed store, hash-verified

310 side_effect_cnt = 0
311
312 def cb1(_, grad):
313 nonlocal side_effect_cnt
314 side_effect_cnt += 1
315 return grad / 2
316
317 def cb2(_, grad):
318 return F.clip(grad, -2e-2, 2e-2)

Callers 6

dispatch_kernsMethod · 0.85
create_conv1x1_strategyFunction · 0.85
get_strategy_typeMethod · 0.85
make_default_strategyMethod · 0.85
make_nopack_strategyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected