MCPcopy Create free account
hub / github.com/Pints-AI/1.5-Pints / reset_parameters

Function reset_parameters

lit_gpt/utils.py:60–64  ·  view source on GitHub ↗

Calls `reset_parameters` on the module and all its submodules.

(module: nn.Module)

Source from the content-addressed store, hash-verified

58
59
60def reset_parameters(module: nn.Module) -> None:
61 """Calls `reset_parameters` on the module and all its submodules."""
62 for mod in module.modules():
63 if callable(getattr(mod, 'reset_parameters', None)):
64 mod.reset_parameters()
65
66
67def check_valid_checkpoint_dir(

Callers

nothing calls this directly

Calls 1

reset_parametersMethod · 0.45

Tested by

no test coverage detected