标题: RKNN 中onnx 模型转换问题 RKNN_ERR_MODEL_INVALID [打印本页] 作者: 281963347 时间: 2019-12-4 11:05 标题: RKNN 中onnx 模型转换问题 RKNN_ERR_MODEL_INVALID 我尝试将一个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']