MCPcopy Index your code
hub / github.com/dmlc/dgl / zero_grad

Method zero_grad

python/dgl/optim/pytorch/sparse_optim.py:451–453  ·  view source on GitHub ↗

clean grad cache

(self)

Source from the content-addressed store, hash-verified

449 """
450
451 def zero_grad(self):
452 """clean grad cache"""
453 self._clean_grad = True
454
455 def state_dict(self, **kwargs): # pylint: disable=unused-argument
456 """Return a copy of the whole optimizer states stored in CPU memory.

Callers 15

explain_nodeMethod · 0.45
explain_graphMethod · 0.45
explain_nodeMethod · 0.45
explain_graphMethod · 0.45
run_clientFunction · 0.45
test_sparse_adamFunction · 0.45
test_sparse_adam_uvaFunction · 0.45
test_sparse_adam_dtypeFunction · 0.45
start_sparse_adam_workerFunction · 0.45
start_torch_adam_workerFunction · 0.45

Calls

no outgoing calls

Tested by 8

run_clientFunction · 0.36
test_sparse_adamFunction · 0.36
test_sparse_adam_uvaFunction · 0.36
test_sparse_adam_dtypeFunction · 0.36
start_sparse_adam_workerFunction · 0.36
start_torch_adam_workerFunction · 0.36