MCPcopy Create free account
hub / github.com/Standard-Intelligence/hertz-dev / count_parameters

Function count_parameters

utils/interp.py:32–33  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

30
31def param_count(module):
32 def count_parameters(model):
33 return sum(p.numel() for p in model.parameters() if p.requires_grad)
34
35 total_params = count_parameters(module)
36 output = [f'Total model parameters: {total_params:,}', '---------------------------']

Callers 2

param_countFunction · 0.85
layer_param_distributionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected