MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / zero_module

Function zero_module

monai/networks/nets/diffusion_model_unet.py:51–57  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module: nn.Module)

Source from the content-addressed store, hash-verified

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

Callers 6

__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…