Thank you!
Your method is useful!
But I find that I can’t modify the weight use net.state_dict.data.copy_(); I can use code like this :
for para in net.parameters():
para.data.copy_(quantization_weight)
to modify each layers’ weight and bias