为了排查om精度损失过大问题,我参考【模型精度排查指南】使用MSIT工具排查OM模型精度问题_CANN_昇腾论坛这篇帖子使用msit工具将onnx和om模型进行了比对,日志如下:
(base) HwHiAiUser@orangepiaipro:~/Desktop/yolo-project/test$ msit debug compare -gm /home/HwHiAiUser/Desktop/yolo-project/onnx/efficientnet_b3.onnx -om /home/HwHiAiUser/Desktop/yolo-project/om/efficientnet_b3.om -i /home/HwHiAiUser/Desktop/yolo-project/test/input_4.npy -o /home/HwHiAiUser/Desktop/yolo-project/test --input-shape "input:1,3,300,300" 2025-03-04 11:16:03,385 - 711279 - msit_debug_loger - INFO - Start to converting the model to json 2025-03-04 11:16:03,385 - 711279 - msit_debug_loger - INFO - ATC command line /usr/local/Ascend/ascend-toolkit/7.0.0/aarch64-linux/bin/atc --mode=1 --om=/home/HwHiAiUser/Desktop/yolo-project/om/efficientnet_b3.om --json=/home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json 2025-03-04 11:16:03,385 - 711279 - msit_debug_loger - INFO - Execute command:/usr/local/Ascend/ascend-toolkit/7.0.0/aarch64-linux/bin/atc --mode=1 --om=/home/HwHiAiUser/Desktop/yolo-project/om/efficientnet_b3.om --json=/home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json 2025-03-04 11:16:06,610 - 711279 - msit_debug_loger - INFO - Complete model conversion to json /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json. 2025-03-04 11:16:07,279 - 711279 - msit_debug_loger - INFO - The /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json file is exists. 2025-03-04 11:16:07,812 - 711279 - msit_debug_loger - INFO - The input of model is not dynamic. 2025-03-04 11:16:15.608574456 [E:onnxruntime:Default, env.cc:251 ThreadMain] pthread_setaffinity_np failed for thread: 711842, index: 2, mask: {3, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set. 2025-03-04 11:16:15,913 - 711279 - msit_debug_loger - INFO - Fix dynamic input shape of input to [1, 3, 300, 300] 2025-03-04 11:16:15,914 - 711279 - msit_debug_loger - INFO - model inputs tensor info: [{'name': 'input', 'shape': (1, 3, 300, 300), 'type': 'tensor(float)'}]
2025-03-04 11:16:15,917 - 711279 - msit_debug_loger - INFO - load input file name: input_4.bin, shape: (1, 3, 300, 300), dtype: float32 2025-03-04 11:16:16,051 - 711279 - msit_debug_loger - INFO - Modified model has being saved successfully at: /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/new_efficientnet_b3.onnx 2025-03-04 11:16:16.053255643 [E:onnxruntime:Default, env.cc:251 ThreadMain] pthread_setaffinity_np failed for thread: 711850, index: 2, mask: {3, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set. 2025-03-04 11:16:29,425 - 711279 - msit_debug_loger - INFO - net_output node is:0, file path is /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/onnx/classifier_classifier_1_Gemm.0.1741058189425352.npy 2025-03-04 11:16:29,425 - 711279 - msit_debug_loger - INFO - dump data success 2025-03-04 11:16:30,290 - 711279 - msit_debug_loger - INFO - Execute command:python /usr/local/Ascend/ascend-toolkit/latest/toolkit/tools/operator_cmp/compare/msaccucmp.py compare -m /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/npu/20250304111608/0/efficientnet_b3/1/0 -g /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/onnx -f /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json -out /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603 2025-03-04 11:17:01,211 - 711279 - msit_debug_loger - INFO - Finish compare the files in directory /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/npu/20250304111608/0/efficientnet_b3/1/0 with those in directory /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/onnx. 2025-03-04 11:17:01,212 - 711279 - msit_debug_loger - WARNING - the original name: PartitionedCall/classifier/classifier.1/Gemm_add_4:0:output of net output maybe not correct! 2025-03-04 11:17:01,212 - 711279 - msit_debug_loger - INFO - Analyser init parameter csv_path=/home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/result_20250304111631.csv 2025-03-04 11:17:01,256 - 711279 - msit_debug_loger - INFO - Analyser call parameter strategy=FIRST_INVALID_OVERALL, max_column_len=30 2025-03-04 11:17:01,256 - 711279 - msit_debug_loger - INFO - Operators may lead to inaccuracy: 2025-03-04 11:17:01,256 - 711279 - msit_debug_loger - INFO -
生成的csv文件为:链接: https://pan.baidu.com/s/1NbmloaLxp8mK7-nf_HVwjg?pwd=q5ge 提取码: q5ge
因为是刚接触这方面知识,我有点看不明白csv里面的内容,部分截图如下
大神们可以帮我看一下到底是哪里出现了问题吗?我该怎么进行调试解决这个问题?
为了排查om精度损失过大问题,我参考【模型精度排查指南】使用MSIT工具排查OM模型精度问题_CANN_昇腾论坛这篇帖子使用msit工具将onnx和om模型进行了比对,日志如下:
(base) HwHiAiUser@orangepiaipro:~/Desktop/yolo-project/test$ msit debug compare -gm /home/HwHiAiUser/Desktop/yolo-project/onnx/efficientnet_b3.onnx -om /home/HwHiAiUser/Desktop/yolo-project/om/efficientnet_b3.om -i /home/HwHiAiUser/Desktop/yolo-project/test/input_4.npy -o /home/HwHiAiUser/Desktop/yolo-project/test --input-shape "input:1,3,300,300" 2025-03-04 11:16:03,385 - 711279 - msit_debug_loger - INFO - Start to converting the model to json 2025-03-04 11:16:03,385 - 711279 - msit_debug_loger - INFO - ATC command line /usr/local/Ascend/ascend-toolkit/7.0.0/aarch64-linux/bin/atc --mode=1 --om=/home/HwHiAiUser/Desktop/yolo-project/om/efficientnet_b3.om --json=/home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json 2025-03-04 11:16:03,385 - 711279 - msit_debug_loger - INFO - Execute command:/usr/local/Ascend/ascend-toolkit/7.0.0/aarch64-linux/bin/atc --mode=1 --om=/home/HwHiAiUser/Desktop/yolo-project/om/efficientnet_b3.om --json=/home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json 2025-03-04 11:16:06,610 - 711279 - msit_debug_loger - INFO - Complete model conversion to json /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json. 2025-03-04 11:16:07,279 - 711279 - msit_debug_loger - INFO - The /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json file is exists. 2025-03-04 11:16:07,812 - 711279 - msit_debug_loger - INFO - The input of model is not dynamic. 2025-03-04 11:16:15.608574456 [E:onnxruntime:Default, env.cc:251 ThreadMain] pthread_setaffinity_np failed for thread: 711842, index: 2, mask: {3, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set. 2025-03-04 11:16:15,913 - 711279 - msit_debug_loger - INFO - Fix dynamic input shape of input to [1, 3, 300, 300] 2025-03-04 11:16:15,914 - 711279 - msit_debug_loger - INFO - model inputs tensor info: [{'name': 'input', 'shape': (1, 3, 300, 300), 'type': 'tensor(float)'}]
2025-03-04 11:16:15,917 - 711279 - msit_debug_loger - INFO - load input file name: input_4.bin, shape: (1, 3, 300, 300), dtype: float32 2025-03-04 11:16:16,051 - 711279 - msit_debug_loger - INFO - Modified model has being saved successfully at: /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/new_efficientnet_b3.onnx 2025-03-04 11:16:16.053255643 [E:onnxruntime:Default, env.cc:251 ThreadMain] pthread_setaffinity_np failed for thread: 711850, index: 2, mask: {3, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set. 2025-03-04 11:16:29,425 - 711279 - msit_debug_loger - INFO - net_output node is:0, file path is /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/onnx/classifier_classifier_1_Gemm.0.1741058189425352.npy 2025-03-04 11:16:29,425 - 711279 - msit_debug_loger - INFO - dump data success 2025-03-04 11:16:30,290 - 711279 - msit_debug_loger - INFO - Execute command:python /usr/local/Ascend/ascend-toolkit/latest/toolkit/tools/operator_cmp/compare/msaccucmp.py compare -m /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/npu/20250304111608/0/efficientnet_b3/1/0 -g /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/onnx -f /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/model/efficientnet_b3.json -out /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603 2025-03-04 11:17:01,211 - 711279 - msit_debug_loger - INFO - Finish compare the files in directory /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/npu/20250304111608/0/efficientnet_b3/1/0 with those in directory /home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/dump_data/onnx. 2025-03-04 11:17:01,212 - 711279 - msit_debug_loger - WARNING - the original name: PartitionedCall/classifier/classifier.1/Gemm_add_4:0:output of net output maybe not correct! 2025-03-04 11:17:01,212 - 711279 - msit_debug_loger - INFO - Analyser init parameter csv_path=/home/HwHiAiUser/Desktop/yolo-project/test/20250304111603/result_20250304111631.csv 2025-03-04 11:17:01,256 - 711279 - msit_debug_loger - INFO - Analyser call parameter strategy=FIRST_INVALID_OVERALL, max_column_len=30 2025-03-04 11:17:01,256 - 711279 - msit_debug_loger - INFO - Operators may lead to inaccuracy: 2025-03-04 11:17:01,256 - 711279 - msit_debug_loger - INFO -
生成的csv文件为:链接: https://pan.baidu.com/s/1NbmloaLxp8mK7-nf_HVwjg?pwd=q5ge 提取码: q5ge
因为是刚接触这方面知识,我有点看不明白csv里面的内容,部分截图如下
大神们可以帮我看一下到底是哪里出现了问题吗?我该怎么进行调试解决这个问题?