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

Function zero_module

diffplanner/models/utils/stylization_block.py:5–11  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

3
4
5def zero_module(module):
6 """
7 Zero out the parameters of a module and return it.
8 """
9 for p in module.parameters():
10 p.detach().zero_()
11 return module
12
13
14class StylizationBlock(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected