运行python程序脚本
>>>from rknn.api import RKNN
>>>rknn = RKNN()
>>>rknn.list_devices()
显示
all device(s) with adb mode:
emulator-5554
all device(s) with ntb mode:
TS018083201200336
*************************
W Cannot use both device with adb mode and device with ntb mode.
(['emulator-5554'], ['TS018083201200336']
修改程序,运行报错:
E RKNNAPI: RKNN VERSION:
E RKNNAPI: API: 1.7.1 (566a9b6 build: 2021-10-28 14:53:41)
E RKNNAPI: DRV: 1.4.0 (b4a8096 build: 2020-09-14 11:15:57)
E RKNNAPI: ==============================================
E Catch exception when init runtime!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 897, in rknn.api.rknn_base.RKNNBase.init_runtime
E File "rknn/api/rknn_runtime.py", line 341, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
E Exception: RKNN init failed. error code: RKNN_ERR_MODEL_INVALID
E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
E Current device id is: TS018083201200336
E Devices connected:
E ['emulator-5554', 'TS018083201200336']
Init runtime environment failed.