MCPcopy Create free account
hub / github.com/ZinYY/TreeLoRA / count_parameter

Function count_parameter

model/Regular/OGD.py:13–14  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

11
12
13def count_parameter(model):
14 return sum(p.numel() for p in model.parameters())
15
16def orthonormalize(vectors, normalize=True, start_idx=0):
17 assert (vectors.size(1) <= vectors.size(0)), 'number of vectors must be smaller or equal to the dimension'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected