(model)
| 30 | return iter(params) |
| 31 | |
| 32 | def weight_parameters(model): |
| 33 | params = [] |
| 34 | for n, m in model.named_parameters(): |
| 35 | if n.find('weight') > -1 and not (n.find('scale') > -1 or n.find('zero_point') > -1): |
| 36 | params.append(m) |
| 37 | return iter(params) |
| 38 | |
| 39 | def set_quant_parameters(model, requires_grad): |
| 40 | params = [] |