论文标题
搜索您想要的内容:屏障板NAS进行混合精度量化
Search What You Want: Barrier Panelty NAS for Mixed Precision Quantization
论文作者
论文摘要
新兴的硬件可以支持混合精度CNN模型推断,该模型为不同层分配了不同的位宽度。学会找到一个可以保持准确性并满足模型大小和计算的特定限制的最佳混合精度模型,这是极其挑战的,因为在训练混合精度模型以及所有可能的位量化的巨大空间中很难。在本文中,我们提出了一种新型的基于软屏障的NAS(BP-NAS)进行混合精度量化,以确保所有搜索模型都在由复杂性约束定义的有效域内,因此只能通过一次进行搜索来返回给定约束下的最佳模型。提出的软屏障惩罚是可微分的,并且可能会对有效域之外的模型造成非常大的损失,而几乎没有对有效域内模型的惩罚,因此仅在可行的域中限制了搜索。此外,还提出了一个可区分的概率正常器,以确保对NAS学习是合理的。分配重塑培训策略也用于使培训更加稳定。 BP-NAS在分类(CIFAR-10,IMAGENET)和检测(可可)上均设置了新的艺术状态,从而超过了手动和自动设计的所有有效混合精度方法。特别是,与现有的可可检测中现有最佳混合精度模型相比,BP-NAS获得更高的地图(最高2.7 \%的地图改进)以及较低的位计算成本。
Emergent hardwares can support mixed precision CNN models inference that assign different bitwidths for different layers. Learning to find an optimal mixed precision model that can preserve accuracy and satisfy the specific constraints on model size and computation is extremely challenge due to the difficult in training a mixed precision model and the huge space of all possible bit quantizations. In this paper, we propose a novel soft Barrier Penalty based NAS (BP-NAS) for mixed precision quantization, which ensures all the searched models are inside the valid domain defined by the complexity constraint, thus could return an optimal model under the given constraint by conducting search only one time. The proposed soft Barrier Penalty is differentiable and can impose very large losses to those models outside the valid domain while almost no punishment for models inside the valid domain, thus constraining the search only in the feasible domain. In addition, a differentiable Prob-1 regularizer is proposed to ensure learning with NAS is reasonable. A distribution reshaping training strategy is also used to make training more stable. BP-NAS sets new state of the arts on both classification (Cifar-10, ImageNet) and detection (COCO), surpassing all the efficient mixed precision methods designed manually and automatically. Particularly, BP-NAS achieves higher mAP (up to 2.7\% mAP improvement) together with lower bit computation cost compared with the existing best mixed precision model on COCO detection.