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
https://github.com/666DZY666/micronet/blob/096d9911b92aec9c52a5ddf1d8d694c32f345111/micronet/compression/quantization/wqaq/iao/quantize.py#L135
比如input = -2.5, 感觉需要添加一个判断
tensor[tensor < 0] = torch.ceil(tensor[tensor < 0] - 0.5)