MCPcopy Create free account
hub / github.com/TencentARC/MotionCtrl / count_params

Function count_params

utils/utils.py:11–15  ·  view source on GitHub ↗
(model, verbose=False)

Source from the content-addressed store, hash-verified

9
10
11def count_params(model, verbose=False):
12 total_params = sum(p.numel() for p in model.parameters())
13 if verbose:
14 print(f"{model.__class__.__name__} has {total_params*1.e-6:.2f} M params.")
15 return total_params
16
17
18def check_istarget(name, para_list):

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected