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

Method clear_grad

imperative/python/test/unit/jit/test_tracing.py:873–875  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

871 return x
872
873 def clear_grad(self):
874 self.a.grad = None
875 self.b.grad = None
876
877 @partial_trace
878 def fwd_only(a, b):

Callers 15

test_advance_indexingFunction · 0.45
trainFunction · 0.45
update_modelFunction · 0.45
test_save_loadFunction · 0.45
run_dtr_resnet1202Function · 0.45
runFunction · 0.45
test_xornet_trace_dumpFunction · 0.45
trainFunction · 0.45
funcFunction · 0.45
runnerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected