MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / count_parameters

Function count_parameters

utils/common.py:967–968  ·  view source on GitHub ↗
(model: torch.nn.Module)

Source from the content-addressed store, hash-verified

965 return LambdaLR(optimizer, lr_lambda, last_epoch)
966
967def count_parameters(model: torch.nn.Module) -> int:
968 return sum(p.numel() for p in model.parameters() if p.requires_grad)
969
970def total_count_parameters(model: torch.nn.Module) -> int:
971 return sum(p.numel() for p in model.parameters())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected