Toybrick

模型转换失败

weidao

注册会员

积分
69
发表于 2019-6-3 09:55:02    查看: 5907|回复: 4 | [复制链接]    打印 | 显示全部楼层

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

jefferyzhang

版主

积分
12851
发表于 2019-6-3 10:12:52 | 显示全部楼层
打开verbose=True可以看到具体哪个op不支持.
onnx转手2次问题比较多,建议你找个tensorflow或者caffe的mobilenet_v2来转
回复

使用道具 举报

weidao

注册会员

积分
69
 楼主| 发表于 2019-6-3 10:31:45 | 显示全部楼层
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

注册会员

积分
69
 楼主| 发表于 2019-6-3 10:42:00 | 显示全部楼层
jefferyzhang 发表于 2019-6-3 10:12
打开verbose=True可以看到具体哪个op不支持.
onnx转手2次问题比较多,建议你找个tensorflow或者caffe的mobi ...

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

使用道具 举报

jefferyzhang

版主

积分
12851
发表于 2019-6-4 14:20:47 | 显示全部楼层
weidao 发表于 2019-6-3 10:42
请问支持的算子都有哪些,有相关文档吗

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

使用道具 举报

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

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表