一、问题现象(附报错日志上下文):
量化过程未报错,但是使用量化后的模型做推理时yolov5无结果。备注,未量化时推理正常

二、软件版本:
-- 驱动版本6.0.0,CANN版本6.0.1,amct版本6.0.1
三、测试步骤:
使用yolov5的官方代码和开源模型yolov5s.pt进行实验,yolov5s.pt转化为yolov5s.onnx备用。使用coco数据集val2017的前10张图像(000000000139.jpg-000000001000.jpg)加上yolov5测试样张(bus.jpg和zidane.jpg)作为校准集。
量化命令:
amct_onnx calibration --model="./yolov5s.onnx" --save_path="./amct-onnx/" --input_shape="images:1,3,640,640" --data_dir="./image_bin/" --data_types="float32"
转化命令:
atc --input_shape="images:1,3,640,640" --input_format=NCHW --output="weight/yolov5s" --soc_version=Ascend310 --framework=5 --model="./amct-onnx_deploy_model.onnx" --output_type=UINT8 --insert_op_conf=aipp_test.cfg
在ATlas300I上的结果如上图,同时使用amct_onnx得到的fake_quant_model.onnx进行上位机仿真时得到报错:
INVALID_GRAPH : Load model from ./amct-onnx_fake_quant_model.onnx failed:This is an invalid model. In Node, ("Conv_0.quant",AscendQuant, "amct.customop", -1) : ("images": tensor(float),) -> ("Conv_0.quant.output0",) , Error No opset import for domain 'amct.customop'
一、问题现象(附报错日志上下文):

量化过程未报错,但是使用量化后的模型做推理时yolov5无结果。备注,未量化时推理正常
二、软件版本:
-- 驱动版本6.0.0,CANN版本6.0.1,amct版本6.0.1
三、测试步骤:
使用yolov5的官方代码和开源模型yolov5s.pt进行实验,yolov5s.pt转化为yolov5s.onnx备用。使用coco数据集val2017的前10张图像(000000000139.jpg-000000001000.jpg)加上yolov5测试样张(bus.jpg和zidane.jpg)作为校准集。
量化命令:
amct_onnx calibration --model="./yolov5s.onnx" --save_path="./amct-onnx/" --input_shape="images:1,3,640,640" --data_dir="./image_bin/" --data_types="float32"
转化命令:
atc --input_shape="images:1,3,640,640" --input_format=NCHW --output="weight/yolov5s" --soc_version=Ascend310 --framework=5 --model="./amct-onnx_deploy_model.onnx" --output_type=UINT8 --insert_op_conf=aipp_test.cfg
在ATlas300I上的结果如上图,同时使用amct_onnx得到的fake_quant_model.onnx进行上位机仿真时得到报错:
INVALID_GRAPH : Load model from ./amct-onnx_fake_quant_model.onnx failed:This is an invalid model. In Node, ("Conv_0.quant",AscendQuant, "amct.customop", -1) : ("images": tensor(float),) -> ("Conv_0.quant.output0",) , Error No opset import for domain 'amct.customop'