MCPcopy
hub / github.com/snap-stanford/GraphGym / params_count

Function params_count

graphgym/utils/comp_budget.py:7–15  ·  view source on GitHub ↗

Computes the number of parameters. Args: model (nn.Module): PyTorch model

(model)

Source from the content-addressed store, hash-verified

5
6
7def params_count(model):
8 '''
9 Computes the number of parameters.
10
11 Args:
12 model (nn.Module): PyTorch model
13
14 '''
15 return sum([p.numel() for p in model.parameters()])
16
17
18def get_stats():

Callers 3

main_pyg.pyFile · 0.90
main.pyFile · 0.90
get_statsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected