建议使用以下浏览器,以获得最佳体验。 IE 9.0+以上版本 Chrome 31+ 谷歌浏览器 Firefox 30+ 火狐浏览器
请选择 进入手机版 | 继续访问电脑版
设置昵称

在此一键设置昵称,即可参与社区互动!

确定
我再想想
选择版块
标签
您还可以添加5个标签
  • 没有搜索到和“关键字”相关的标签
  • 云产品
  • 解决方案
  • 技术领域
  • 通用技术
  • 平台功能
取消

风无影

发帖: 26粉丝: 0

级别 : 注册会员

发消息 + 关注

发表于2020年09月21日 10:38:30 257 6
直达本楼层的链接
楼主
显示全部楼层
[问题求助] yolov3 模型转换 失败

【功能模块】 使用mindstudio ,做模型转换

https://blog.csdn.net/Hello_yes112/article/details/107546041


【操作步骤&问题现象】

设置好环境变量


1、按照文档mindstudio 转

2、按照文档命令行 转


都不行


【截图信息】

20200921-103250(eSpace).png


20200921-103429(eSpace).png


20200921-103456(eSpace).png

【日志信息】(可选,上传日志内容或者附件)


命令行转换的结果:

[EVENT] FE(4576,atc):2020-09-21-10:25:17.975.745 [fusion_engine/adapter/tbe_adapter/tbe_op_store_adapter.cpp:99]SerialPreCompileOp:"[FE_PERFORMANCE]The time cost of PreBuildTbe during FEGraphOptimizer::OptimizeFusedGraph is [676] micro second."

[EVENT] FE(4576,atc):2020-09-21-10:25:17.978.277 [fusion_engine/adapter/tbe_adapter/tbe_op_store_adapter.cpp:99]SerialPreCompileOp:"[FE_PERFORMANCE]The time cost of PreBuildTbe during FEGraphOptimizer::OptimizeFusedGraph is [1189] micro second."

[EVENT] FE(4576,atc):2020-09-21-10:25:17.980.125 [fusion_engine/adapter/tbe_adapter/tbe_op_store_adapter.cpp:99]SerialPreCompileOp:"[FE_PERFORMANCE]The time cost of PreBuildTbe during FEGraphOptimizer::OptimizeFusedGraph is [750] micro second."

[EVENT] FE(4576,atc):2020-09-21-10:25:17.982.484 [fusion_engine/adapter/tbe_adapter/tbe_op_store_adapter.cpp:99]SerialPreCompileOp:"[FE_PERFORMANCE]The time cost of PreBuildTbe during FEGraphOptimizer::OptimizeFusedGraph is [1097] micro second."

[EVENT] FE(4576,atc):2020-09-21-10:25:17.983.946 [fusion_engine/adapter/tbe_adapter/tbe_op_store_adapter.cpp:99]SerialPreCompileOp:"[FE_PERFORMANCE]The time cost of PreBuildTbe during FEGraphOptimizer::OptimizeFusedGraph is [596] micro second."

[EVENT] FE(4576,atc):2020-09-21-10:25:18.038.644 [fusion_engine/adapter/tbe_adapter/tbe_op_store_adapter.cpp:99]SerialPreCompileOp:"[FE_PERFORMANCE]The time cost of PreBuildTbe during FEGraphOptimizer::OptimizeFusedGraph is [53270] micro second."

Traceback (most recent call last):

  File "/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/atc/python/site-packages/te/te/platform/fusion_manager.py", line 525, in prebuild_op

    opfunc(*op_args, **kwargs)

  File "/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/opp/op_impl/built-in/ai_core/tbe/impl/yolo.py", line 1175, in yolo

    yolo_op.cls_dout))

  File "/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/atc/python/site-packages/te/te/tik/tik_lib/tik_source_info.py", line 41, in wrapper

    f_return = func(*args, **kwargs)

  File "/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/atc/python/site-packages/te/te/tik/api/tik_build.py", line 605, in BuildCCE

    _modify_resource_for_ir(self.total_ir_lines)

  File "/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/atc/python/site-packages/te/te/tik/api/tik_build.py", line 1303, in _modify_resource_for_ir

    _STACK_BYTES_PER_MIN_MODIFY_IR, -1))

ValueError: current limit exceeds maximum limit

[ERROR] TEFUSION(4576,atc):2020-09-21-10:25:19.181.611 [tensor_engine/te_fusion/fusion_op.cc:1921]DoPrebuildOp Failed to call prebuild_op, need to check op info: module name[<module 'impl.yolo' from '/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/opp/op_impl/built-in/ai_core/tbe/impl/yolo.py'>], op name [yolo], op args ({'shape': (1, 255, 13, 13), 'ori_shape': (1, 255, 13, 13), 'format': 'NCHW', 'ori_format': 'NCHW', 'dtype': 'float16', 'addr_type': 0, 'valid_shape': (), 'slice_offset': (), 'use_L1_workspace': 0, 'L1_workspace_size': -1, 'L1_fusion_type': -1, 'L1_addr_offset': 0, 'total_shape': (), 'split_index': 0}, {'shape': (1, 12, 192), 'ori_shape': (1, 12, 169), 'format': 'NCHW', 'ori_format': 'NCHW', 'dtype': 'float16', 'addr_type': 0, 'valid_shape': (), 'slice_offset': (), 'use_L1_workspace': 0, 'L1_workspace_size': -1, 'L1_fusion_type': -1, 'L1_addr_offset': 0, 'total_shape': (), 'split_index':

[ERROR] TEFUSION(4576,atc):2020-09-21-10:25:19.182.190 [tensor_engine/te_fusion/fusion_op.cc:1921]DoPrebuildOp  0}, {'shape': (1, 528), 'ori_shape': (1, 507), 'format': 'NCHW', 'ori_format': 'NCHW', 'dtype': 'float16', 'addr_type': 0, 'valid_shape': (), 'slice_offset': (), 'use_L1_workspace': 0, 'L1_workspace_size': -1, 'L1_fusion_type': -1, 'L1_addr_offset': 0, 'total_shape': (), 'split_index': 0}, {'shape': (1, 80, 528), 'ori_shape': (1, 80, 507), 'format': 'NCHW', 'ori_format': 'NCHW', 'dtype': 'float16', 'addr_type': 0, 'valid_shape': (), 'slice_offset': (), 'use_L1_workspace': 0, 'L1_workspace_size': -1, 'L1_fusion_type': -1, 'L1_addr_offset': 0, 'total_shape': (), 'split_index': 0}, 3, 4, 80, 'V3', True, False, False).

[ERROR] TEFUSION(4576,atc):2020-09-21-10:25:19.185.189 [tensor_engine/te_fusion/fusion_api.cc:657]PreBuildTbeOp Failed to prebuild op. Name=[-1_0_yolo1], Module=[/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/opp/op_impl/built-in/ai_core/tbe/impl/yolo], FuncName=[yolo].

[ERROR] FE(4576,atc):2020-09-21-10:25:19.185.844 [fusion_engine/adapter/tbe_adapter/tbe_op_store_adapter.cpp:96]SerialPreCompileOp:"Pre-build Tbe op failed."

[ERROR] FE(4576,atc):2020-09-21-10:25:19.186.500 [fusion_engine/graph_optimizer/op_compiler/op_compiler.cpp:431]PreCompileOp:"PreCompileOp failed, graph name = partition0_rank1_new_sub_graph1"

[ERROR] GE(4576,atc):2020-09-21-10:25:19.187.210 [framework/domi/graph/optimize/graph_optimize.cc:113]4590 OptimizeSubGraph: ErrorNo: -1(failed) [OptimizeSubGraph][OptimizeFusedGraph]: graph optimize failed, ret:-1

[ERROR] GE(4576,atc):2020-09-21-10:25:19.187.820 [framework/domi/graph/manager/graph_manager.cc:2011]4590 ProcessSubGraphWithMultiThreads: ErrorNo: -1(failed) SubGraph optimize Failed AIcoreEngine

[ERROR] GE(4576,atc):2020-09-21-10:25:19.188.508 [framework/domi/graph/manager/graph_manager.cc:343]4576 SetSubgraph: ErrorNo: -1(failed) subgraph 0 optimize failed

[ERROR] GE(4576,atc):2020-09-21-10:25:19.191.411 [framework/domi/graph/manager/graph_manager.cc:2324]4576 OptimizeSubgraph: ErrorNo: -1(failed) Graph set subgraph Failed

[EVENT] GE(4576,atc):2020-09-21-10:25:19.191.986 [framework/domi/graph/manager/graph_manager.cc:389]4576 PreRun:[GEPERFTRACE] The time cost of GraphManager::OptimizeSubgraph is [21401166] micro second.

[ERROR] GE(4576,atc):2020-09-21-10:25:19.192.630 [framework/domi/graph/manager/graph_manager.cc:389]4576 PreRun: ErrorNo: -1(failed) Failed to process GraphManager_OptimizeSubgraph

[ERROR] GE(4576,atc):2020-09-21-10:25:19.193.184 [framework/domi/graph/manager/graph_manager.cc:424]4576 StartForRunGraph: ErrorNo: -1(failed) PreRun Failed.

[ERROR] GE(4576,atc):2020-09-21-10:25:19.193.756 [framework/domi/graph/manager/graph_manager.cc:732]4576 BuildGraph: ErrorNo: 1343242268(PreRun failed.) [BuildGraph] StartForRunGraph failed!

[ERROR] GE(4576,atc):2020-09-21-10:25:19.194.313 [framework/domi/generator/ge_generator.cc:502]4576 BuildModel: ErrorNo: 1343266819(Graph manager build graph failed.) GraphManager build graph fail, graph id: 0

[ERROR] GE(4576,atc):2020-09-21-10:25:19.194.863 [framework/domi/generator/ge_generator.cc:310]4576 GenerateModel: ErrorNo: 1343266819(Graph manager build graph failed.) Build model failed.

[ERROR] GE(4576,atc):2020-09-21-10:25:19.195.855 [framework/domi/offline/main.cc:916]4576 GenerateModel: ErrorNo: -1(failed) GE GenerateOfflineModel execute failed

[ERROR] GE(4576,atc):2020-09-21-10:25:19.196.466 [framework/domi/offline/main.cc:917]4576 GenerateModel: ErrorNo: -1(failed) ATC Generate execute failed

[EVENT] FE(4576,atc):2020-09-21-10:25:19.378.580 [fusion_engine/fusion_manager/fusion_manager.cpp:316]Finalize:"[FE_PERFORMANCE]The time cost of FusionManager::Finalize is [174742] micro second."

ATC run failed, Please check the detail log, Try 'atc --help' for more information



举报
分享

分享文章到朋友圈

分享文章到微博

L_y

发帖: 7粉丝: 22

级别 : 版主

发消息 + 关注

发表于2020年09月21日 10:50:27
直达本楼层的链接
沙发
显示全部楼层

你好 转换yolov3模型,可以参考这个链接: https://gitee.com/ascend/samples/tree/master/objectdetection/for_atlas200dk_1.7x.0.0_c++

先下载原始模型文件:image.png

然后配置好环境变量:

image.png

最后在命令行中执行atc命令:

image.png

请注意检查环境变量是否配置好了

点赞 评论 引用 举报

风无影

发帖: 26粉丝: 0

级别 : 注册会员

发消息 + 关注

发表于2020年09月21日 10:57:01
直达本楼层的链接
板凳
显示全部楼层

回复:L_y 发表于 2020-9-21 10:50 你好 转换yolov3模型,可以参考这个链接: https://gitee.com/ascend/samples/tree/master/objectdetec

我就是参考的这个文档啊,目前也只有这一个文档

点赞 评论 引用 举报

风无影

发帖: 26粉丝: 0

级别 : 注册会员

发消息 + 关注

发表于2020年09月21日 11:53:43
直达本楼层的链接
地板
显示全部楼层

这个log,有人能看明白啥原因吗?



[ERROR] TEFUSION(921,atc):2020-09-21-11:48:28.428.348 [tensor_engine/te_fusion/fusion_op.cc:1921]DoPrebuildOp Failed to call prebuild_op, need to check op info: module name[<module 'impl.yolo' from '/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/opp/op_impl/built-in/ai_core/tbe/impl/yolo.py'>], op name [yolo], op args ({'shape': (1, 255, 13, 13), 'ori_shape': (1, 255, 13, 13), 'format': 'NCHW', 'ori_format': 'NCHW', 'dtype': 'float16', 'addr_type': 0, 'valid_shape': (), 'slice_offset': (), 'use_L1_workspace': 0, 'L1_workspace_size': -1, 'L1_fusion_type': -1, 'L1_addr_offset': 0, 'total_shape': (), 'split_index': 0}, {'shape': (1, 12, 192), 'ori_shape': (1, 12, 169), 'format': 'NCHW', 'ori_format': 'NCHW', 'dtype': 'float16', 'addr_type': 0, 'valid_shape': (), 'slice_offset': (), 'use_L1_workspace': 0, 'L1_workspace_size': -1, 'L1_fusion_type': -1, 'L1_addr_offset': 0, 'total_shape': (), 'split_index':

[ERROR] TEFUSION(921,atc):2020-09-21-11:48:28.429.218 [tensor_engine/te_fusion/fusion_op.cc:1921]DoPrebuildOp  0}, {'shape': (1, 528), 'ori_shape': (1, 507), 'format': 'NCHW', 'ori_format': 'NCHW', 'dtype': 'float16', 'addr_type': 0, 'valid_shape': (), 'slice_offset': (), 'use_L1_workspace': 0, 'L1_workspace_size': -1, 'L1_fusion_type': -1, 'L1_addr_offset': 0, 'total_shape': (), 'split_index': 0}, {'shape': (1, 80, 528), 'ori_shape': (1, 80, 507), 'format': 'NCHW', 'ori_format': 'NCHW', 'dtype': 'float16', 'addr_type': 0, 'valid_shape': (), 'slice_offset': (), 'use_L1_workspace': 0, 'L1_workspace_size': -1, 'L1_fusion_type': -1, 'L1_addr_offset': 0, 'total_shape': (), 'split_index': 0}, 3, 4, 80, 'V3', True, False, False).

[ERROR] TEFUSION(921,atc):2020-09-21-11:48:28.432.738 [tensor_engine/te_fusion/fusion_api.cc:657]PreBuildTbeOp Failed to prebuild op. Name=[-1_0_yolo1], Module=[/home/gongjia/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0/opp/op_impl/built-in/ai_core/tbe/impl/yolo], FuncName=[yolo].

[ERROR] FE(921,atc):2020-09-21-11:48:28.433.526 [fusion_engine/adapter/tbe_adapter/tbe_op_store_adapter.cpp:96]SerialPreCompileOp:"Pre-build Tbe op failed."

[ERROR] FE(921,atc):2020-09-21-11:48:28.434.278 [fusion_engine/graph_optimizer/op_compiler/op_compiler.cpp:431]PreCompileOp:"PreCompileOp failed, graph name = partition0_rank1_new_sub_graph1"

[ERROR] GE(921,atc):2020-09-21-11:48:28.435.340 [framework/domi/graph/optimize/graph_optimize.cc:113]927 OptimizeSubGraph: ErrorNo: -1(failed) [OptimizeSubGraph][OptimizeFusedGraph]: graph optimize failed, ret:-1

[ERROR] GE(921,atc):2020-09-21-11:48:28.436.253 [framework/domi/graph/manager/graph_manager.cc:2011]927 ProcessSubGraphWithMultiThreads: ErrorNo: -1(failed) SubGraph optimize Failed AIcoreEngine

[ERROR] GE(921,atc):2020-09-21-11:48:28.437.037 [framework/domi/graph/manager/graph_manager.cc:343]921 SetSubgraph: ErrorNo: -1(failed) subgraph 0 optimize failed

[ERROR] GE(921,atc):2020-09-21-11:48:28.440.178 [framework/domi/graph/manager/graph_manager.cc:2324]921 OptimizeSubgraph: ErrorNo: -1(failed) Graph set subgraph Failed

[EVENT] GE(921,atc):2020-09-21-11:48:28.440.865 [framework/domi/graph/manager/graph_manager.cc:389]921 PreRun:[GEPERFTRACE] The time cost of GraphManager::OptimizeSubgraph is [18135576] micro second.

[ERROR] GE(921,atc):2020-09-21-11:48:28.441.512 [framework/domi/graph/manager/graph_manager.cc:389]921 PreRun: ErrorNo: -1(failed) Failed to process GraphManager_OptimizeSubgraph

[ERROR] GE(921,atc):2020-09-21-11:48:28.442.125 [framework/domi/graph/manager/graph_manager.cc:424]921 StartForRunGraph: ErrorNo: -1(failed) PreRun Failed.

[ERROR] GE(921,atc):2020-09-21-11:48:28.442.755 [framework/domi/graph/manager/graph_manager.cc:732]921 BuildGraph: ErrorNo: 1343242268(PreRun failed.) [BuildGraph] StartForRunGraph failed!

[ERROR] GE(921,atc):2020-09-21-11:48:28.443.375 [framework/domi/generator/ge_generator.cc:502]921 BuildModel: ErrorNo: 1343266819(Graph manager build graph failed.) GraphManager build graph fail, graph id: 0

[ERROR] GE(921,atc):2020-09-21-11:48:28.443.980 [framework/domi/generator/ge_generator.cc:310]921 GenerateModel: ErrorNo: 1343266819(Graph manager build graph failed.) Build model failed.

[ERROR] GE(921,atc):2020-09-21-11:48:28.445.008 [framework/domi/offline/main.cc:916]921 GenerateModel: ErrorNo: -1(failed) GE GenerateOfflineModel execute failed

[ERROR] GE(921,atc):2020-09-21-11:48:28.445.747 [framework/domi/offline/main.cc:917]921 GenerateModel: ErrorNo: -1(failed) ATC Generate execute failed

[EVENT] FE(921,atc):2020-09-21-11:48:28.618.246 [fusion_engine/fusion_manager/fusion_manager.cpp:316]Finalize:"[FE_PERFORMANCE]The time cost of FusionManager::Finalize is [164141] micro second."

ATC run failed, Please check the detail log, Try 'atc --help' for more information


点赞 评论 引用 举报

风无影

发帖: 26粉丝: 0

级别 : 注册会员

发消息 + 关注

发表于2020年09月21日 12:09:36
直达本楼层的链接
5#
显示全部楼层

resnet50那个转换是ok的

点赞 评论 引用 举报

L_y

发帖: 7粉丝: 22

级别 : 版主

发消息 + 关注

发表于2020年09月21日 18:03:05
直达本楼层的链接
6#
显示全部楼层

你好 请问你的开发套件包是这个吗:

image.png

  1. 首先执行如下命令下载yolov3的原始模型文件 和aipp配置文件:

mkdir -p $HOME/yolov3

wget -P $HOME/yolov3 https://c7xcode.obs.cn-north-4.myhuaweicloud.com/models/yolov3/yolov3.caffemodel

wget -P $HOME/yolov3 https://c7xcode.obs.cn-north-4.myhuaweicloud.com/models/yolov3/yolov3.prototxt

wget -P $HOME/yolov3 https://c7xcode.obs.cn-north-4.myhuaweicloud.com/models/yolov3/aipp_nv12.cfg

cd $HOME/yolov3

2. 之后再终端中配置环境变量 

export install_path=$HOME/Ascend/ascend-toolkit/20.0.RC1/x86_64-linux_gcc7.3.0

export PATH=/usr/local/python3.7.5/bin:${install_path}/atc/ccec_compiler/bin:${install_path}/atc/bin:$PATH

export PYTHONPATH=${install_path}/atc/python/site-packages/te:${install_path}/atc/python/site-packages/topi:$PYTHONPATH

export LD_LIBRARY_PATH=${install_path}/atc/lib64:$LD_LIBRARY_PATH

export ASCEND_OPP_PATH=${install_path}/opp

3. 执行如下命令 进行模型转换

atc --model=yolov3.prototxt --weight=yolov3.caffemodel --framework=0 --output=yolov3 --soc_version=Ascend310 --insert_op_conf=aipp_nv12.cfg

我试过了 如果按照这个步骤操作,模型是可以转换成功的,你可以检查下你的套件包有没有安装成功

如果你需要转换后的om模型,我可以私发给你

点赞 评论 引用 举报

风无影

发帖: 26粉丝: 0

级别 : 注册会员

发消息 + 关注

发表于2020年09月22日 14:48:53
直达本楼层的链接
7#
显示全部楼层

回复:L_y 发表于 2020-9-21 18:03 你好 请问你的开发套件包是这个吗:首先执行如下命令下载yolov3的原始模型文件 和aipp配置文件:mkdir -p $HOME/yolov3wget -P

我是用的这个开发套件

我后面用了个新的干净的环境,就没问题,命令行也是ok

不知道是哪里引起的问题

点赞 评论 引用 举报

游客

富文本
Markdown
您需要登录后才可以回帖 登录 | 立即注册