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

Function cb2

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

Source from the content-addressed store, hash-verified

315 return grad / 2
316
317 def cb2(_, grad):
318 return F.clip(grad, -2e-2, 2e-2)
319
320 gm = autodiff.GradManager().attach(model.parameters(), callbacks=[cb1, cb2])
321 optimizer = AdamW(model.parameters(), lr=0.01)

Callers 6

TEST_FFunction · 0.85
dispatch_kernsMethod · 0.85
create_conv1x1_strategyFunction · 0.85
get_strategy_typeMethod · 0.85
make_default_strategyMethod · 0.85
execMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected