MCPcopy Create free account
hub / github.com/microsoft/Cream / _get_params

Function _get_params

TinyCLIP/src/training/main.py:57–62  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

55
56def compute_params(model):
57 def _get_params(model):
58 if model is None:
59 return 0
60 n_parameters = sum(p.numel()
61 for p in model.parameters() if p.requires_grad)
62 return n_parameters
63
64 def _get_buffers(model):
65 if model is None:

Callers 1

compute_paramsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected