MCPcopy
hub / github.com/zai-org/CogVideo / zero_module

Function zero_module

sat/sgm/modules/attention.py:105–111  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

103
104
105def zero_module(module):
106 """
107 Zero out the parameters of a module and return it.
108 """
109 for p in module.parameters():
110 p.detach().zero_()
111 return module
112
113
114def Normalize(in_channels):

Callers 1

__init__Method · 0.70

Calls 1

parametersMethod · 0.80

Tested by

no test coverage detected