MCPcopy Create free account
hub / github.com/JaydenLyh/Reward-Forcing / zero_module

Function zero_module

demo_utils/utils.py:196–199  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

194
195@torch.no_grad()
196def zero_module(module):
197 for p in module.parameters():
198 p.detach().zero_()
199 return module
200
201
202@torch.no_grad()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected