MCPcopy
hub / github.com/sshaoshuai/PointRCNN / trainable_params

Function trainable_params

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

Return list of trainable params in `m`.

(m: nn.Module)

Source from the content-addressed store, hash-verified

89
90
91def trainable_params(m: nn.Module):
92 "Return list of trainable params in `m`."
93 res = filter(lambda p: p.requires_grad, m.parameters())
94 return res
95
96
97def 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