666DZY666 / micronet

micronet, a model compression and deploy lib. compression: 1、quantization: quantization-aware-training(QAT), High-Bit(>2b)(DoReFa/Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference)、Low-Bit(≤2b)/Ternary and Binary(TWN/BNN/XNOR-Net); post-training-quantization(PTQ), 8-bit(tensorrt); 2、 pruning: normal、regular and group convolutional channel pruning; 3、 group convolution structure; 4、batch-normalization fuse for quantization. deploy: tensorrt, fp32/fp16/int8(ptq-calibration)、op-adapt(upsample)、dynamic_shape
MIT License
2.22k stars 478 forks source link

请问其中QAT和QAFT的区别是什么呢 #84

Closed wmkai closed 2 years ago

wmkai commented 3 years ago

在我理解中,QAT应该是包含QAFT的?求解答

wmkai commented 3 years ago

还有一个问题就是bn_fuse_calib有什么好处吗,我理解这个设置就是使用batch的统计量,如果直接设置为false,直接使用running的统计量是不是会更好点呢。

666DZY666 commented 3 years ago

1、QAT或PTQ后的QAFT阶段会冻结BN的统计参数和模型的量化参数,可以提升量化训练最终效果; 2、bn_fuse_calib是为了解决量化训练中的抖动,具体可参考Quantizing deep convolutional networks for efficient inference: A whitepaper中的BN融合部分。