MCPcopy Create free account
hub / github.com/bbaaii/DreamDiffusion / zero_module

Function zero_module

code/dc_ldm/modules/attention.py:67–73  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

65
66
67def zero_module(module):
68 """
69 Zero out the parameters of a module and return it.
70 """
71 for p in module.parameters():
72 p.detach().zero_()
73 return module
74
75
76def Normalize(in_channels):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected