mace results do not match onnx results for quantization model
Closed this issue · 2 comments
大佬好,我在验证onnx量化模型输出与mace输出结果一致性问题时,发现部分图的输出结果不一致,如下:
output2 MACE VS ONNX similarity: 4.033790425038377e-06 , sqnr: 0.5000000000081355 , pixel_accuracy: 1.0
ERROR: [] /container/path/onnx2mace/docker_path/mace_20210223/tools/validate.py:125: ******************************************
Similarity Test Failed
我基于pytorch平台量化,转成onnx模型,目的是在dsp上跑的(高通骁龙660 8 核 AIE芯片)
以下是我的yml:
library_name: libtorch_onnx_mobilenet
target_abis: [armeabi-v7a]
#target_socs: [sdm660]
model_graph_format: code
model_data_format: code
models:
rough:
platform: "onnx"
model_file_path: /container/path/onnx2mace/docker_path/fingertip0.3.3/model_29_rough_qat.onnx
model_sha256_checksum: 8a2439d93f8c337c95126f5f0e6d71b6594d3c5637837b3dc716823f3be635e7
subgraphs:
- input_tensors:
- actual_input_1
input_shapes:
- 1,112,112,3
input_ranges:
- -128.0,127.0
output_tensors:
- output1
- output2
output_shapes:
- 1,2
- 1,3
check_tensors:
- output2
check_shapes:
- 1,3
validation_inputs_data:
#- https://cnbj1.fds.api.xiaomi.com/mace/inputs/dog.npy
- /container/path/onnx2mace/docker_path/fingertip0.3.3/112_test.npy
output_data_formats:
- NCHW
- NONE
backend: pytorch
runtime: dsp
# data_type: fp32_fp32
limit_opencl_kernel_time: 0
obfuscate: 0
winograd: 0
quantize: 1
模型,yml和数据请在下面下载:链接:https://pan.baidu.com/s/1k35cmV_61gV-5rTkj84OOQ
提取码:cckb
好的,感谢