Onnx import error with sdk version 6.4.3

@Frank 你好,我之前有一个分割模型onnx,在6.4.2.1使用step三步法,转成功过;今天试了在6.4.3出现了如下错误,log如下,请问是哪里有问题
0_import_model.sh:

#!/bin/bash

NAME=dbnetmbv3
ACUITY_PATH=../../../linux_sdk_6.4.3/acuity-toolkit/bin/

convert_onnx=${ACUITY_PATH}convertonnx

$convert_onnx \
    --onnx-model ${NAME}.onnx \
    --net-output ${NAME}.json \
    --data-output ${NAME}.data 
log detail


D Calc tensor Sigmoid_615 (1, 1, 640, 480)
I build output layer attach_Sigmoid_Sigmoid_192:out0
I Try match Sigmoid_Sigmoid_192:out0
I Match r_sigmoid [[‘Sigmoid_Sigmoid_192’]] [[‘Sigmoid’]] to [[‘Sigmoid’]]
I Try match Conv_Conv_191:out0
I Match r_conv_no_bias [[‘Conv_Conv_191’, ‘Initializer_branch1.8.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Upsample_Upsample_190:out0
I Match r_upsample_l9_scale_to_resize [[‘Upsample_Upsample_190’, ‘Initializer_787’]] [[‘Upsample’]] to [[‘image_resize’]]
I Try match Relu_Relu_189:out0
I Match r_relu [[‘Relu_Relu_189’]] [[‘Relu’]] to [[‘relu’]]
I Try match Conv_Conv_188:out0
I Match r_conv [[‘Initializer_759’, ‘Conv_Conv_188’, ‘Initializer_758’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Upsample_Upsample_187:out0
I Match r_upsample_l9_scale_to_resize [[‘Upsample_Upsample_187’, ‘Initializer_786’]] [[‘Upsample’]] to [[‘image_resize’]]
I Try match Relu_Relu_186:out0
I Match r_relu [[‘Relu_Relu_186’]] [[‘Relu’]] to [[‘relu’]]
I Try match Conv_Conv_185:out0
I Match r_conv [[‘Initializer_756’, ‘Conv_Conv_185’, ‘Initializer_755’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Concat_Concat_184:out0
I Match concat_4 [[‘Concat_Concat_184’]] [[‘Concat’]] to [[‘concat’]]
I Try match Conv_Conv_177:out0
I Match r_conv_no_bias [[‘Conv_Conv_177’, ‘Initializer_fpn.out1.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Upsample_Upsample_179:out0
I Match r_upsample_l9_scale_to_resize [[‘Upsample_Upsample_179’, ‘Initializer_783’]] [[‘Upsample’]] to [[‘image_resize’]]
I Try match Upsample_Upsample_181:out0
I Match r_upsample_l9_scale_to_resize [[‘Upsample_Upsample_181’, ‘Initializer_784’]] [[‘Upsample’]] to [[‘image_resize’]]
I Try match Upsample_Upsample_183:out0
I Match r_upsample_l9_scale_to_resize [[‘Upsample_Upsample_183’, ‘Initializer_785’]] [[‘Upsample’]] to [[‘image_resize’]]
I Try match Add_Add_176:out0
I Match r_add [[‘Add_Add_176’]] [[‘Add’]] to [[‘add’]]
I Try match Conv_Conv_178:out0
I Match r_conv_no_bias [[‘Conv_Conv_178’, ‘Initializer_fpn.out2.0.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Conv_Conv_180:out0
I Match r_conv_no_bias [[‘Conv_Conv_180’, ‘Initializer_fpn.out3.0.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Conv_Conv_182:out0
I Match r_conv_no_bias [[‘Conv_Conv_182’, ‘Initializer_fpn.out4.0.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Upsample_Upsample_175:out0
I Match r_upsample_l9_scale_to_resize [[‘Upsample_Upsample_175’, ‘Initializer_782’]] [[‘Upsample’]] to [[‘image_resize’]]
I Try match Conv_Conv_167:out0
I Match r_conv_no_bias [[‘Conv_Conv_167’, ‘Initializer_fpn.conv1.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Add_Add_174:out0
I Match r_add [[‘Add_Add_174’]] [[‘Add’]] to [[‘add’]]
I Try match Add_Add_172:out0
I Match r_add [[‘Add_Add_172’]] [[‘Add’]] to [[‘add’]]
I Try match Conv_Conv_170:out0
I Match r_conv_no_bias [[‘Conv_Conv_170’, ‘Initializer_fpn.conv4.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Div_Div_166:out0
I Match r_div [[‘Div_Div_166’]] [[‘Div’]] to [[‘divide’]]
I Try match Add_Add_20:out0
I Match r_add [[‘Add_Add_20’]] [[‘Add’]] to [[‘add’]]
I Try match Upsample_Upsample_173:out0
I Match r_upsample_l9_scale_to_resize [[‘Upsample_Upsample_173’, ‘Initializer_781’]] [[‘Upsample’]] to [[‘image_resize’]]
I Try match Conv_Conv_168:out0
I Match r_conv_no_bias [[‘Conv_Conv_168’, ‘Initializer_fpn.conv2.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Upsample_Upsample_171:out0
I Match r_upsample_l9_scale_to_resize [[‘Upsample_Upsample_171’, ‘Initializer_780’]] [[‘Upsample’]] to [[‘image_resize’]]
I Try match Conv_Conv_169:out0
I Match r_conv_no_bias [[‘Conv_Conv_169’, ‘Initializer_fpn.conv3.weight’]] [[‘Conv’, ‘Constant_0’]] to [[‘convolution’]]
I Try match Mul_Mul_165:out0
I Match r_mul [[‘Mul_Mul_165’]] [[‘Mul’]] to [[‘multiply’]]
I Try match Initializer_779:out0
I Match r_variable [[‘Initializer_779’]] [[‘Constant’]] to [[‘variable’]]
I Try match Conv_Conv_14:out0
I Match r_conv [[‘Initializer_633’, ‘Conv_Conv_14’, ‘Initializer_632’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Conv_Conv_19:out0
I Match r_conv [[‘Initializer_642’, ‘Conv_Conv_19’, ‘Initializer_641’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Relu_Relu_18:out0
I Match r_relu [[‘Relu_Relu_18’]] [[‘Relu’]] to [[‘relu’]]
I Try match Add_Add_37:out0
I Match r_add [[‘Add_Add_37’]] [[‘Add’]] to [[‘add’]]
I Try match Conv_Conv_36:out0
I Match r_conv [[‘Initializer_669’, ‘Conv_Conv_36’, ‘Initializer_668’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Add_Add_119:out0
I Match r_add [[‘Add_Add_119’]] [[‘Add’]] to [[‘add’]]
I Try match Conv_Conv_161:out0
I Match r_conv [[‘Initializer_753’, ‘Conv_Conv_161’, ‘Initializer_752’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Clip_Clip_164:out0
I Match r_clip [[‘Clip_Clip_164’]] [[‘Clip’]] to [[‘clipbyvalue’]]
I Try match Relu_Relu_13:out0
I Match r_relu [[‘Relu_Relu_13’]] [[‘Relu’]] to [[‘relu’]]
I Try match Conv_Conv_17:out0
I Match r_conv [[‘Initializer_639’, ‘Conv_Conv_17’, ‘Initializer_638’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Add_Add_31:out0
I Match r_add [[‘Add_Add_31’]] [[‘Add’]] to [[‘add’]]
I Try match Relu_Relu_35:out0
I Match r_relu [[‘Relu_Relu_35’]] [[‘Relu’]] to [[‘relu’]]
I Try match Conv_Conv_105:out0
I Match r_conv [[‘Initializer_714’, ‘Conv_Conv_105’, ‘Initializer_713’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Conv_Conv_118:out0
I Match r_conv [[‘Initializer_723’, ‘Conv_Conv_118’, ‘Initializer_722’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Add_Add_160:out0
I Match r_add [[‘Add_Add_160’]] [[‘Add’]] to [[‘add’]]
I Try match Add_Add_163:out0
I Match r_add [[‘Add_Add_163’]] [[‘Add’]] to [[‘add’]]
I Try match Conv_Conv_12:out0
I Match r_conv [[‘Initializer_630’, ‘Conv_Conv_12’, ‘Initializer_629’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Relu_Relu_16:out0
I Match r_relu [[‘Relu_Relu_16’]] [[‘Relu’]] to [[‘relu’]]
I Try match Conv_Conv_25:out0
I Match r_conv [[‘Initializer_651’, ‘Conv_Conv_25’, ‘Initializer_650’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Conv_Conv_30:out0
I Match r_conv [[‘Initializer_660’, ‘Conv_Conv_30’, ‘Initializer_659’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Conv_Conv_34:out0
I Match r_conv [[‘Initializer_666’, ‘Conv_Conv_34’, ‘Initializer_665’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Div_Div_104:out0
I Match r_div [[‘Div_Div_104’]] [[‘Div’]] to [[‘divide’]]
I Try match Div_Div_117:out0
I Match r_div [[‘Div_Div_117’]] [[‘Div’]] to [[‘divide’]]
I Try match Add_Add_146:out0
I Match r_add [[‘Add_Add_146’]] [[‘Add’]] to [[‘add’]]
I Try match Conv_Conv_159:out0
I Match r_conv [[‘Initializer_750’, ‘Conv_Conv_159’, ‘Initializer_749’]] [[‘Conv’, ‘Constant_0’, ‘Constant_1’]] to [[‘convolution’]]
I Try match Div_Div_158:out0
I Match r_div [[‘Div_Div_158’]] [[‘Div’]] to [[‘divide’]]
I Try match Constant_Constant_162:out0
I Match r_variable [[‘Constant_Constant_162’]] [[‘Constant’]] to [[‘variable’]]
Traceback (most recent call last):
File “convertonnx.py”, line 52, in
File “convertonnx.py”, line 45, in main
File “acuitylib/vsi_nn.py”, line 153, in load_onnx
File “acuitylib/app/importer/import_onnx.py”, line 111, in run
File “acuitylib/converter/convert_onnx.py”, line 566, in match_paragraph_and_param
File “acuitylib/converter/convert_onnx.py”, line 467, in _onnx_build_acu_layer
File “acuitylib/converter/convert_onnx.py”, line 436, in _onnx_acu_param_assign
File “acuitylib/converter/convert_onnx.py”, line 414, in _onnx_parse_param
File “acuitylib/converter/convert_onnx.py”, line 421, in _onnx_parase_execute
File “”, line 1, in
File “acuitylib/converter/convert_onnx.py”, line 101, in shape_pick
KeyError: 0
[21628] Failed to execute script convertonnx

@librazxc 你可以把模型发给我么,我这边确认一下情况.

@Frank 链接: https://pan.baidu.com/s/1eMy54D-oG9GfUNI_Sw6EZw 密码: wtj2

@librazxc 你好,过期了,可以重新分享一个我么

@Frank
链接:https://pan.baidu.com/s/1z9Lvq2-h3CzmursqvYcPQA
提取码:6tJh

@librazxc 你好,我切换回了6.4.2.1,转换也是一样报错的.

aml_npu_sdk/acuity-toolkit/conversion_scripts$ git branch 
* (HEAD detached at v6.4.2.1) 

一样报了这个错误

Traceback (most recent call last):
  File "convertonnx.py", line 52, in <module>
  File "convertonnx.py", line 45, in main
  File "acuitylib/vsi_nn.py", line 153, in load_onnx
  File "acuitylib/app/importer/import_onnx.py", line 111, in run
  File "acuitylib/converter/convert_onnx.py", line 566, in match_paragraph_and_param
  File "acuitylib/converter/convert_onnx.py", line 467, in _onnx_build_acu_layer
  File "acuitylib/converter/convert_onnx.py", line 436, in _onnx_acu_param_assign
  File "acuitylib/converter/convert_onnx.py", line 414, in _onnx_parse_param
  File "acuitylib/converter/convert_onnx.py", line 421, in _onnx_parase_execute
  File "<string>", line 1, in <module>
  File "acuitylib/converter/convert_onnx.py", line 101, in shape_pick
KeyError: 0
[2203] Failed to execute script convertonnx

@Frank 好的 谢谢。我重新优化了一下onnx的模型,可以转换了。请问现在npu sdk(6.4.3)有新的小版本更新吗?我看gitlab上有新的nnsdk demo更新了。

@librazxc 那个还在优化,优化好了以后会开放