MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / n_params

Function n_params

k_diffusion/utils.py:52–54  ·  view source on GitHub ↗

Returns the number of trainable parameters in a module.

(module)

Source from the content-addressed store, hash-verified

50
51
52def n_params(module):
53 """Returns the number of trainable parameters in a module."""
54 return sum(p.numel() for p in module.parameters())
55
56
57def download_file(path, url, digest=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected