Is In-Domain Data Really Needed? A Pilot Study on Cross-Domain Calibration for Network Quantization
arXiv:2105.07331
Abstract
Post-training quantization methods use a set of calibration data to compute quantization ranges for network parameters and activations. The calibration data usually comes from the training dataset which could be inaccessible due to sensitivity of the data. In this work, we want to study such a problem: can we use out-of-domain data to calibrate the trained networks without knowledge of the original dataset? Specifically, we go beyond the domain of natural images to include drastically different domains such as X-ray images, satellite images and ultrasound images. We find cross-domain calibration leads to surprisingly stable performance of quantized models on 10 tasks in different image domains with 13 different calibration datasets. We also find that the performance of quantized models is correlated with the similarity of the Gram matrices between the source and calibration domains, which can be used as a criterion to choose calibration set for better performance. We believe our research opens the door to borrow cross-domain knowledge for network quantization and compression.
References in corpus (13)
- Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift
- Binarized Neural Networks: Training Deep Neural Networks with Weights and Activations Constrained to +1 or -1
- DoReFa-Net: Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients
- Binarized Neural Networks
- Quantizing deep convolutional networks for efficient inference: A whitepaper
- Ternary Weight Networks
- Trained Ternary Quantization
- Federated Optimization:Distributed Optimization Beyond the Datacenter
- Revisiting Batch Normalization For Practical Domain Adaptation
- Improving Neural Network Quantization without Retraining using Outlier Channel Splitting
- Demystifying Neural Style Transfer
- Towards Efficient Training for Neural Network Quantization
- Generative Low-bitwidth Data Free Quantization