MCPcopy Create free account
hub / github.com/RolnickLab/climart / get_trainable_params

Function get_trainable_params

climart/utils/optimization.py:17–22  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

15
16
17def get_trainable_params(model):
18 trainable_params = []
19 for name, param in model.named_parameters():
20 if param.requires_grad:
21 trainable_params.append(param)
22 return trainable_params

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected