MCPcopy
hub / github.com/open-mmlab/OpenPCDet / trainable_params

Function trainable_params

tools/train_utils/optimization/fastai_optim.py:94–97  ·  view source on GitHub ↗

Return list of trainable params in `m`.

(m: nn.Module)

Source from the content-addressed store, hash-verified

92
93
94def trainable_params(m: nn.Module):
95 "Return list of trainable params in `m`."
96 res = filter(lambda p: p.requires_grad, m.parameters())
97 return res
98
99
100def is_tuple(x) -> bool: return isinstance(x, tuple)

Callers 2

createMethod · 0.85
newMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected