测试yolov3-tiny模型,未进行预编译,模型在计算棒上运行正常。
由于在应用时,初始化环境耗时长,所以在build模型时设置pre_compile=True预编译。
然后如下初始化运行环境:
ret = rknn.init_runtime(target='rk1808')
但在此过程报错如下:
--> Loading model
done. Time: 2.000000 s
--> Building model
W The RKNN Model generated can not run on simulator when pre_compile is True.
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
done. Time: 43.000000 s
--> Export RKNN model
done. Time: 0.000000 s
--> init runtime, taget: rk1808
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.3.0 (c5654ea build: 2019-12-25 08:38:41)
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 988, in rknn.api.rknn_base.RKNNBase.init_runtime
E File "rknn/api/rknn_runtime.py", line 320, 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:
E ['TS018082190800342']
init runtime failed.