MCPcopy Create free account
hub / github.com/MotrixLab/insactor / zero_module

Function zero_module

diffplanner/models/transformers/diffusion_transformer.py:52–58  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

50
51
52def zero_module(module):
53 """
54 Zero out the parameters of a module and return it.
55 """
56 for p in module.parameters():
57 p.detach().zero_()
58 return module
59
60
61class FFN(nn.Module):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected