MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / zero_module

Function zero_module

ldm/modules/attention.py:79–85  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

77
78
79def zero_module(module):
80 """
81 Zero out the parameters of a module and return it.
82 """
83 for p in module.parameters():
84 p.detach().zero_()
85 return module
86
87
88def Normalize(in_channels):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected