# ClipQ: Clipping Optimization for the Post-Training Quantization of Convolutional Neural Network
## 4 Experiments
### Image Classification  
Image classification is a fundamental task in computer vision, which can be classified into lightweight and non lightweight networks based on the number of feature extraction network parameters. Lightweight networks commonly use deep convolution with carefully designed hyperparameters and a quantity of about 10 MB, which is very popular in mobile applications. Due to its sensitivity to quantization bias, it can be used to evaluate the performance of quantization methods. Non-lightweight networks have many more parameters than lightweight networks, such as ResNet, VGG, etc. They are more robust to quantization bias and have smaller quantization accuracy loss under the same quantization bit width.  
The 8-bit quantization results of MobileNetV2 are shown in Figure 7. After quantizing with ClipQ, the network accuracy just drops by 0.31%. Compared with Jacob, the quantization accuracy is improved by 1.6%. The popular quantization tool, TensorRT, performs poorly on MobileNetV2, with 3% loss of network accuracy. BFQ uses 1000 calibration samples for bias correction, but ClipQ outperforms it by 0.98%. ACIQ is adopted to quantize the weights channel-by-channel and quantize the activation layer-by-layer, with a drop of accuracy by 0.72%. Nagel and HPTQ simultaneously employ weight preprocessing, clipping optimization, and bias correction techniques. They achieved 71.16% and 71.46% accuracy, respectively, but they still fell behind ClipQ. Furthermore, we utilize the imagessynthesized by ZeroQ as calibration data to achieve data-free quantization. The result is close to using real data, which is better than ZeroQ and DFQ.  
ShuffleNetV1 is a popular lightweight network. As shown in Figure 8. TensorRT and Jacob perform relatively well on ShuffleNet, with network accuracy dropping by 0.37% and 0.47%, respectively, but ClipQ only results in a 0.09% loss of accuracy. ACIQ reduces the network accuracy by 1.27%. The activation of ShuffleNetV1 may be far away from Gaussian or Laplace distribution, which leads to ACIQ being weaker than other methods. ZeroQ also performs poorly, causing an accuracy loss of nearly 1%.  
MnasNetV1 is a model designed with automatic mobile neural network architecture search technology, and its inference speed on mobile devices is much faster than MobileNetV2 and ShuffleNetV1. ClipQ shows huge advantages over others on this model. In contrast to TensorRT, Jacob, ACIQ, and ZeroQ, its quantization accuracy is improved by 1.8%, 3.1%, 4.2%, and 18.86%, respectively. We observed the standard deviation change in the weights of each channel of the above network in Figure 9. Obviously, the standard deviation of MnasNetV1 is larger than that of MobileNetV2, and the standard deviation of ShuffleNetV1 is the smallest. According to the quantization results, we consider that ClipQ achieves better performance than other methods due to paying more attention to the important weights when the standard deviation of the weights is large.  
For non-lightweight networks (ResNet, VGG, and DenseNet), their 8-bit quantization results are shown in Table 1. After ClipQ quantization, the network accuracy loss is within 0.12%. Compared to other quantization strategies, ClipQ has stronger generalization ability and can adapt to different network architectures. In addition, ClipQ improves inference efficiency while ensuring high accuracy by reducing computational complexity and storage requirements. It has the ability to maintain accuracy and a highly robust quantization method, making it suitable for deep learning inference tasks.  
Figure 8: The 8-bit quantization result of MnasNetV1 and ShuffleNetV1.  
Figure 7: The 8-bit quantization result of MobileNetV2.  
Overall, ClipQ demonstrates superiority in both lightweight and non-lightweight networks, with high accuracy, wide adaptability, and stability, providing strong support for the efficient deployment of deep learning models.