论坛用户问题,帖子链接:https://bbs.huaweicloud.com/forum/thread-117996-1-1.html
将darknet下的yolov4模型转换为onnx模型,然后利用ATC将onnx转换为om文件失败
版本:20.1
报错日志如下:
ATC run failed, Please check the detail log, Try 'atc --help' for more information
E19000: Path[/home/HwHiAiUser/Ascend/ascend-toolkit/20.1.rc1/x86_64-linux/opp/op_impl/custom/ai_core/tbe/config/ascend310]'s realpath is empty, errmsg[The file path does not exist.]
E19010: Check op[ConstantOfShape_451]'s type[ai.onnx::11::ConstantOfShape] failed, the type is unsupported.
E19010: Check op[Where_455]'s type[ai.onnx::11::Where] failed, the type is unsupported.
E19010: Check op[Expand_456]'s type[ai.onnx::11::Expand] failed, the type is unsupported.
E19010: Check op[ConstantOfShape_539]'s type[ai.onnx::11::ConstantOfShape] failed, the type is unsupported.
E19010: Check op[Where_543]'s type[ai.onnx::11::Where] failed, the type is unsupported.
E19010: Check op[Expand_544]'s type[ai.onnx::11::Expand] failed, the type is unsupported.
模型链接如下:
链接:https://pan.baidu.com/s/1oFv9fKBXZMsb0a6M81_6uw
提取码:h25p
atc指令:atc --model=yolov4_1_3_608_608_static.onnx --framework=5 --output=yolov4_e --input_format=NCHW --soc_version=Ascend310 --input_shape="input:1,3,608,608" --out_nodes="Conv_589:0;Conv_612:0;Conv_635:0"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
你好,在最新cann版本复现了你的问题,关键报错如下,你上述的onnx不支持问题,已完善,我们会尽快分析回复。
[ERROR] TBE(36940,atc.bin):2021-04-05-18:36:33.622.252 [/home/jenkins/agent/workspace/Compile_Canndev_Centos_X86/canndev/ops/built-in/op_proto/array_ops.cc:2253][OP_PROTO] ExpandInferShape:2253 OpName:[Expand_456] "Get constValue failed of [shape]"
你好,请问有解决办法吗?
好的,谢谢你
先安装onnxsim:pip3 install onnx-simplifier
再运行如下命令:python3 -m onnxsim --skip-optimization src.onnx dst.onnx
完成简化
最后进行atc命令转换
你好,按照你说的安装onnxsim简化之后的模型可以转换成功,谢谢!
好的,请关闭issue。如下图设置为done状态
登录 后才可以发表评论