Toybrick

标题: 模型转换失败 [打印本页]

作者: weidao    时间: 2019-6-3 09:55
标题: 模型转换失败
[attach]323[/attach]

作者: jefferyzhang    时间: 2019-6-3 10:12
打开verbose=True可以看到具体哪个op不支持.
onnx转手2次问题比较多,建议你找个tensorflow或者caffe的mobilenet_v2来转
作者: weidao    时间: 2019-6-3 10:31
jefferyzhang 发表于 2019-6-3 10:12
打开verbose=True可以看到具体哪个op不支持.
onnx转手2次问题比较多,建议你找个tensorflow或者caffe的mobi ...

这个是错误日志:
I Current ONNX Model use ir_version 4 opset_version 9
D calc tensor shape of Split_152ut1 [[1, 24656, 1], [1, 24656, 1], [1, 24656, 1], [1, 24656, 1]]
D calc tensor shape of Split_123ut2 [[1, 24656, 1], [1, 24656, 1], [1, 24656, 1], [1, 24656, 1]]
D calc tensor shape of Concat_99ut0 [[1, 24656, 20]]
D calc tensor shape of Mul_155ut0 [[1, 24656, 1]]
D calc tensor shape of Mul_161ut0 [[1, 24656, 1]]
D calc tensor shape of Mul_124ut0 [[1, 24656, 1]]
D calc tensor shape of Mul_165ut0 [[1, 24656, 1]]
D calc tensor shape of Add_125ut0 [[1, 24656, 1]]
D calc tensor shape of Add_166ut0 [[1, 24656, 1]]
D calc tensor shape of Add_162ut0 [[1, 24656, 1]]
D calc tensor shape of Add_156:out0 [[1, 24656, 1]]
D calc tensor shape of Mul_153:out0 [[1, 24656, 1]]
D calc tensor shape of Mul_163:out0 [[1, 24656, 1]]
D calc tensor shape of Add_164:out0 [[1, 24656, 1]]
D calc tensor shape of Add_154:out0 [[1, 24656, 1]]
D calc tensor shape of Concat_173:out0 [[1, 24656, 4]]
D calc tensor shape of Concat_186:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_183:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_174:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_213:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_204:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_225:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_219:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_222:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_228:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_210:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_231:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_198:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_216:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_195:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_177:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_201:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_207:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_192:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_180:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_189:out0 [[1, 24656, 6]]
D calc tensor shape of Concat_232:out0 [[1, 493120, 6]]
D import clients finished
I build output layer attach_Slice_233:out0
I build output layer attach_Slice_234:out0
I build output layer attach_Slice_235:out0
I Try match Slice_235:out0
E Catch exception when loading onnx model: ./ssd_300_vgg.onnx!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 344, in rknn.api.rknn_base.RKNNBase.load_onnx
T   File "rknn/base/RKNNlib/converter/convert_onnx.py", line 1005, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.match_paragraph_and_param
T   File "rknn/base/RKNNlib/converter/convert_onnx.py", line 858, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx._onnx_try_match_ruler
T   File "<string>", line 1, in <module>
T KeyError: 'Slice'

作者: weidao    时间: 2019-6-3 10:42
jefferyzhang 发表于 2019-6-3 10:12
打开verbose=True可以看到具体哪个op不支持.
onnx转手2次问题比较多,建议你找个tensorflow或者caffe的mobi ...

请问支持的算子都有哪些,有相关文档吗

作者: jefferyzhang    时间: 2019-6-4 14:20
weidao 发表于 2019-6-3 10:42
请问支持的算子都有哪些,有相关文档吗

看过去是Slice OP不支持。建议你换一个绕过去。
具体支持算子哪些不是很好描述的,因为NPU的算子和软件所说的算子是完全不同的,
例如Conv+ReLu会变成一个NPU算子,而不是两个,如果有些算子单独出现,很可能就会转换失败。
算子的拆分其实每一个架构也都不太一样,目前来看RKNN支持的Tensorflow和Caffee的算子会更加丰富智能点。




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3