Open kucher-web opened 1 year ago
Describe the issue: 在pytroch中,可以通过conv2d.weight的方式获得卷积层的权重值 请问,通过nni的QAT之后,应该如何获得再训练后的权重值?
quantizer = QAT_Quantizer(model, config_list, optimizer, dummy_input) quantizer.compress() for epoch in range(1, epochs + 1): train(model, device, train_loader, optimizer, epoch) scheduler.step()
通过model.conv1.module.weight,可以获得FP32的权重。
model.conv1.module.weight
output=model(input)
model.conv1.module.weight_scale
model.conv1.module.zero_point
model.conv1.module.old_weight
Environment:
Describe the issue: 在pytroch中,可以通过conv2d.weight的方式获得卷积层的权重值 请问,通过nni的QAT之后,应该如何获得再训练后的权重值?
通过
model.conv1.module.weight
,可以获得FP32的权重。output=model(input)
的权重了?model.conv1.module.weight_scale
以及model.conv1.module.zero_point
自己计算?model.conv1.module.old_weight
也会不停迭代?我以为这个属性是用来存放量化之前的权重的Environment: