MCPcopy Create free account
hub / github.com/OpenGVLab/EfficientQAT / trainable_parameters_num

Function trainable_parameters_num

quantize/utils.py:61–67  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

59 return iter(params)
60
61def trainable_parameters_num(model):
62 params = []
63 total = 0
64 for n, m in model.named_parameters():
65 if m.requires_grad:
66 total += m.numel()
67 return total
68
69def set_quant_state(model, weight_quant: bool = False):
70 for m in model.modules():

Callers 1

block_apFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected