MCPcopy Index your code
hub / github.com/CompVis/diff2flow / zero_module

Function zero_module

diff2flow/models/unet/util.py:92–98  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

90
91
92def zero_module(module):
93 """
94 Zero out the parameters of a module and return it.
95 """
96 for p in module.parameters():
97 p.detach().zero_()
98 return module
99
100
101def normalization(channels):

Callers 3

__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected