MCPcopy Create free account
hub / github.com/CompVis/diff2flow / zero_module

Function zero_module

diff2flow/models/unet/attention.py:77–83  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

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

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected