MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS / _hook

Method _hook

models/custom_autotune.py:35–37  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

33 self.reset_idx = [arg_names.index(k) for k in reset_to_zero]
34
35 def _hook(args):
36 for i in self.reset_idx:
37 args[i].zero_()
38 self.hook = _hook
39 self.arg_names = arg_names
40 # prune configs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected