yolov5_tensorrt_int8 icon indicating copy to clipboard operation
yolov5_tensorrt_int8 copied to clipboard

导出ptq量化导出onnx后onnx推理的结果和pt推理的结果差异很大

Open shupinghu opened this issue 10 months ago • 4 comments

为了方便测试,我参考作者的代码写了一个分类网络的ptq代码,然后在转onnx的时候对输出结果进行了对比,发现差异很大,不知道您这边有没有遇到过这个问题

复现步骤,使用cifar数据集,所以复现很快:

  1. python fp32_train.py
  2. python ptq.py(注意修改加载模型的路径)

aa.zip

shupinghu avatar Apr 09 '24 12:04 shupinghu