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

Function count_params

VDM_Decoder/vae_modules/utils.py:241–245  ·  view source on GitHub ↗
(model, verbose=False)

Source from the content-addressed store, hash-verified

239
240
241def count_params(model, verbose=False):
242 total_params = sum(p.numel() for p in model.parameters())
243 if verbose:
244 print(f"{model.__class__.__name__} has {total_params * 1.e-6:.2f} M params.")
245 return total_params
246
247
248def instantiate_from_config(config):

Callers

nothing calls this directly

Calls 1

parametersMethod · 0.80

Tested by

no test coverage detected