MCPcopy Create free account
hub / github.com/InternRobotics/NavDP / replace_submodules

Function replace_submodules

baselines/nomad/nomad_model.py:258–296  ·  view source on GitHub ↗

Replace all submodules selected by the predicate with the output of func. predicate: Return true if the module is to be replaced. func: Return new module to use.

(
    root_module: nn.Module,
    predicate: Callable[[nn.Module], bool],
    func: Callable[[nn.Module], nn.Module],
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

replace_bn_with_gnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected