海思NNIEmapper转换模型出错提示:"inputshapesizeisnotequaltoinputnamesize"怎么办

这篇文章给大家介绍海思NNIE mapper转换模型出错提示:"input shape size is not equal to input name size"怎么办,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

10年的和龙网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都全网营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整和龙建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“和龙网站设计”,“和龙网站推广”以来,每个客户项目都认真落实执行。

caffe模型在电脑上运行正常,使用海思nnie_mapper转换模型时失败,输出如下:

wuyy@wuyy-VirtualBox:~/dl/weights$ nnie_mapper_12 yolov3_608.cfg 
Mapper Version 1.2.2.1_B030 (NNIE_1.2) 19090610466402
begin net parsing....

**********************************************************
ERROR: file: parseInputDim  line: 2244
input shape size is not equal to input name size!



**********************************************************
ERROR: file: parseInputParamOldVersion  line: 2151
ERROR: RUN FAILURE in line 2151. Return = 262148



**********************************************************
ERROR: file: parseModel  line: 14827
ERROR: RUN FAILURE in line 14827. Return = 262148



**********************************************************
ERROR: file: compile  line: 609
ERROR: RUN FAILURE in line 609. Return = 262148



**********************************************************
ERROR: file: iFEPCompile  line: 114
ERROR: RUN FAILURE in line 114. Return = 262148



**********************************************************
ERROR: file: main  line: 164
iFEPCompile failed(262148)

begin quant files writing....
end quant files writing

原因是deploy.prototxt文件输入层的格式与海思的nnie_mapper支持的格式不兼容,海思支持的格式参阅文档:HiSVP 开发指南.pdf,章节:3.2.1 deploy.prototxt 输入层格式 原来的格式如下:

input: "data"
input_dim: 1
input_dim: 3
input_dim: 608
input_dim: 608

修改如下:

input: "data"
input_shape {
	dim: 1
	dim: 3
	dim: 608
	dim: 608
}

修改后重新运行nnie_mapper,转换成功:

wuyy@wuyy-VirtualBox:~/dl/weights$ nnie_mapper_12 yolov3_608.cfg 
Mapper Version 1.2.2.1_B030 (NNIE_1.2) 19090610466402
begin net parsing....
end net parsing
begin prev optimizing....
end prev optimizing....
begin net quantalizing(CPU)....
end quantalizing
begin optimizing....
end optimizing
begin NNIE[0] mem allocation....
end NNIE[0] memory allocating
begin NNIE[0] instruction generating....
end NNIE[0] instruction generating
begin parameter compressing....
end parameter compressing
begin compress index generating....
end compress index generating
begin binary code generating....
end binary code generating
begin quant files writing....
end quant files writing
wuyy@wuyy-VirtualBox:~/dl/weights$ ls
cnn_net_tree.dot          dog_bike_car.jpg    instruction.txt   yolov3_416.caffemodel  yolov3_608_inst.wk
cnn_net_tree_gv.dot       dout_nne_para.txt   mapper_debug.log  yolov3_416.cfg         yolov3_608.prototxt
cnn_net_tree_org.dot      gfpq_param.txt      mapper_error.log  yolov3_416.prototxt
cnn_net_tree_pre.dot      ibd_para.txt        netmem_info.data  yolov3_608.caffemodel
cnn_net_tree_pre_org.dot  image_ref_list.txt  RUNTIME.txt       yolov3_608.cfg

关于海思NNIE mapper转换模型出错提示:"input shape size is not equal to input name size"怎么办就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。


当前文章:海思NNIEmapper转换模型出错提示:"inputshapesizeisnotequaltoinputnamesize"怎么办
文章源于:http://lszwz.com/article/pccdgd.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款