MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / count_trainable_parameters

Function count_trainable_parameters

models/transformer/wan/modules/utils.py:91–99  ·  view source on GitHub ↗
(named_parameters)

Source from the content-addressed store, hash-verified

89
90
91def count_trainable_parameters(named_parameters):
92 total_trainable = 0
93 total_untrainable = 0
94 for name, param in named_parameters:
95 if param.requires_grad:
96 total_trainable += param.numel()
97 else:
98 total_untrainable += param.numel()
99 return total_trainable, total_untrainable
100
101
102def load_safetensors(in_path: str):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected