LSQuantization
LSQuantization copied to clipboard
How to deploy the quantized model?
When we have trained the quantization model, how to deploy it?
use original model with strict=False
use original model with strict=False
I mean it is different with the official interface about the Quantization Aware Training(https://pytorch.org/docs/stable/quantization.html),I don't know how to get the int8 model from the trained model.
not sure what int8 model means.
anyway, i use this method. at model init part,
during training self.conv1 = lsqconv(~~)
during inferencing self.conv1 = nn.Conv2d(~~)
name "self.conv1" does not changed and weights/ bias shapes are same between them. so it works.
i wrote "using strict=false" because if not, it causes error when using upper codes.
not sure what int8 model means.
anyway, i use this method. at model init part,
during training self.conv1 = lsqconv(~~)
during inferencing self.conv1 = nn.Conv2d(~~)
name "self.conv1" does not changed and weights/ bias shapes are same between them. so it works.
i wrote "using strict=false" because if not, it causes error when using upper codes.
int8 means 8 bit , which is quantized from the float model (32 bit)
Hello,请问你的这个问题后来弄清楚了吗,我刚接触,现在也想知道怎么得到int8模型