MCPcopy Create free account
hub / github.com/TencentARC/MotionCtrl / zero_module

Function zero_module

lvdm/basics.py:25–31  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

23 return self
24
25def zero_module(module):
26 """
27 Zero out the parameters of a module and return it.
28 """
29 for p in module.parameters():
30 p.detach().zero_()
31 return module
32
33def scale_module(module, scale):
34 """

Callers 6

__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected