Susan19900316 / yolov5_tensorrt_int8

yolov5 tensorrt int8量化方法汇总
57 stars 13 forks source link

W1025 19:01:36.982106 139703698719360 tensor_quantizer.py:173] Disable MaxCalibrator #5

Closed Anoue closed 9 months ago

Anoue commented 1 year ago

这是怎么回事啊

Susan19900316 commented 12 months ago

使用哪种量化方法在哪个位置报的这个错误?

Anoue commented 12 months ago

使用哪种量化方法在哪个位置报的这个错误?

int8

Anoue commented 12 months ago

home/ubuntu/miniconda3/envs/yolov5/lib/python3.8/site-packages/pytorch_quantization/nn/modules/tensor_quantizer.py:285: TracerWarning: Converting a tensor to a Python number might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! inputs, amax.item() / bound, 0, /home/ubuntu/miniconda3/envs/yolov5/lib/python3.8/site-packages/pytorch_quantization/nn/modules/tensor_quantizer.py:291: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! quant_dim = list(amax.shape).index(list(amax_sequeeze.shape)[0]) /home/ubuntu/miniconda3/envs/yolov5/lib/python3.8/site-packages/pytorch_quantization/nn/modules/tensor_quantizer.py:285: TracerWarning: Converting a tensor to a Python number might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! inputs, amax.item() / bound, 0, /home/ubuntu/miniconda3/envs/yolov5/lib/python3.8/site-packages/pytorch_quantization/nn/modules/tensor_quantizer.py:291: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! quant_dim = list(amax.shape).index(list(amax_sequeeze.shape)[0]) /home/ubuntu/tzy/yolov5s/models/yolo.py:61: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if self.onnx_dynamic or self.grid[i].shape[2:4] != x[i].shape[2:4]:

Susan19900316 commented 11 months ago

@Anoue 抱歉,刚看到,我印象我转换的过程中也有这个warning,但量化后模型精度大概下降1至2个点,所以就没管此warning。