Toybrick

RKNN 中onnx 模型转换问题 RKNN_ERR_MODEL_INVALID

281963347

新手上路

积分
24
发表于 2019-12-4 11:05:48    查看: 7235|回复: 3 | [复制链接]    打印 | 显示全部楼层
我尝试将一个pytorch模型转换为onnx,成功了,但是 onnx 模型转换成rknn却失败.我怀疑问题可能出在模型输入上.  模型输入为 (1,3,480,640) 即 第二维是通道数.
onnx 版本是 1.4.1  RKNN Toolkit 1.2.1 API 1.2.0
中间打印的日志:
--> Loading model
W Do not support shape > 4.
W Unhandle status: the input shape of reshape layer Reshape_183_12 is not 4-D
W Do not support shape > 4.
W Unhandle status: the input shape of reshape layer Reshape_187_13 is not 4-D
W Do not support shape > 4.
W Unhandle status: the input shape of reshape layer Reshape_191_14 is not 4-D
W Warning: Axis may need to be adjusted according to original model shape.
W Warning: Axis may need to be adjusted according to original model shape.
W Warning: Axis may need to be adjusted according to original model shape.
done
--> Building model
W Do not support shape > 4.
W Unhandle status: the input shape of reshape layer Reshape_183_12 is not 4-D
W Do not support shape > 4.
W Unhandle status: the input shape of reshape layer Reshape_187_13 is not 4-D
W Do not support shape > 4.
W Unhandle status: the input shape of reshape layer Reshape_191_14 is not 4-D
W Warning: Axis may need to be adjusted according to original model shape.
W Warning: Axis may need to be adjusted according to original model shape.
W Warning: Axis may need to be adjusted according to original model shape.


--> Init runtime environment
E RKNNAPI: rknn_init,  msg_load_ack fail, ack = 1(ACK_FAIL), expect 0(ACK_SUCC)!
E RKNNAPI: ==============================================
E RKNNAPI: RKNN VERSION:
E RKNNAPI:   API: 1.2.0 (1190a71 build: 2019-09-25 12:39:14)
E RKNNAPI:   DRV: 0.9.8 (943f8e8 build: 2019-07-03 17:51:17)
E RKNNAPI: ==============================================
E Catch exception when init runtime!
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 788, in rknn.api.rknn_base.RKNNBase.init_runtime
E   File "rknn/api/rknn_runtime.py", line 303, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
E Exception: RKNN init failed. error code: RKNN_ERR_MODEL_INVALID
E Current device id is: None
E Devices connected:
Init runtime environment failed
E ['TS018082190800251']

回复

使用道具 举报

在路上_小菜鸟

新手上路

积分
21
发表于 2020-7-25 17:52:46 | 显示全部楼层
请问您这个问题解决了吗?onnx->rknn成功,PC模拟成功,然后加载到计算棒上面就出现你上面的那个错误
回复

使用道具 举报

leok

版主

积分
894
发表于 2020-7-27 08:27:26 | 显示全部楼层
rknn toolkit以及相关组件请升级到最新版本,1.3.2.
回复

使用道具 举报

在路上_小菜鸟

新手上路

积分
21
发表于 2020-7-27 08:42:22 | 显示全部楼层
leok 发表于 2020-7-27 08:27
rknn toolkit以及相关组件请升级到最新版本,1.3.2.

已经升级了,我的计算棒API和DRV都是1.3.2  转换模型使用的rknn-toolkit1.3.2,依然出现上面的问题。
回复

使用道具 举报

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

本版积分规则

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


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