MCPcopy
hub / github.com/OpenPPL/ppq / clear

Method clear

ppq/samples/QAT/trainer.py:142–146  ·  view source on GitHub ↗

Clear training state.

(self)

Source from the content-addressed store, hash-verified

140 exporter.export(file_path=file_path, graph=self.graph)
141
142 def clear(self):
143 """Clear training state."""
144 for tensor in self._training_graph.parameters():
145 tensor.requires_grad = False
146 tensor._grad = None

Callers 15

QuantZoo_Yolo.pyFile · 0.45
buildMethod · 0.45
replace_opMethod · 0.45
replace_varMethod · 0.45
format_padMethod · 0.45
format_parameterMethod · 0.45
fuse_bnMethod · 0.45
fuse_gemmMethod · 0.45

Calls 1

parametersMethod · 0.45

Tested by

no test coverage detected