MCPcopy Create free account
hub / github.com/OSU-NLP-Group/Loop-Think-Generalize / count_trainable_params

Function count_trainable_params

train_systematicity.py:135–136  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

133
134
135def count_trainable_params(model):
136 return sum(p.numel() for p in model.parameters() if p.requires_grad)
137
138
139if __name__ == '__main__':

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected