-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我用自己的数据集训练后,int8精度远低于f16精度 #1
Comments
添加 test 可以先查看是那一层运算出现精度损失,基于你 f16 是正确的可以确定你的模型结构与算子是可被TPU-MLIR接受的,但是 INT8 量化需要现制作量化表,基于这个量化表才能进行INT8量化,如果没有是不能进行直接量化的 |
我跑了量化表,这个也是正常的,但是就是转int8的时候test过不了 |
你的量化表是需要你自己的部分数据集,deploy 加 test 可以通过修改参数增大容差, run_qtable.py yolov5s.mlir \
--dataset ../COCO2017 \
--calibration_table yolov5s_cali_table \
--chip bm1684x \
--min_layer_cos 0.999 \ #若这里使用默认的0.99时,程序会检测到原始int8模型已满足0.99的cos,从而直接不再搜素
--expected_cos 0.9999 \
-o yolov5s_qtable |
我是量化表是用自己的数据集跑出来的结果,量化表的容差使用的默认容差,没有报错。就是生成int8时使用了test就会报错 |
test 报错是正常的,因为只要比对不过都会出错,此时可以查看哪里有精度误差 |
在yolov8转换的过程中,我如果设置了test就转不出来int8,所以我删去了test但是转出来的bmodel效果极差,检测能力基本为0,但是f16效果却很好,请问一下这个问题有解决方法吗?
The text was updated successfully, but these errors were encountered: