|
板凳
楼主 |
发表于 2020-12-24 10:52:12
|
只看该作者
跑的rknn-toolkit, 升到1.4.0后。init_runtime有报错:找不到模块。rknn.list_devices()是能查到的。
*************************
all device(s) with ntb mode:
TS018083201100586
*************************
--> Loading model
done
--> Init runtime environment
D target set by user is: rk1808
E Catch exception when init runtime!
E Traceback (most recent call last):
E File "rknn\api\rknn_base.py", line 1128, in rknn.api.rknn_base.RKNNBase.init_runtime
E File "rknn\api\rknn_runtime.py", line 160, in rknn.api.rknn_runtime.RKNNRuntime.__init__
E File "rknn\api\rknn_runtime.py", line 225, in rknn.api.rknn_runtime.RKNNRuntime._load_library
E File "D:\anaconda3\envs\py_3_6_8_toybrick\lib\ctypes\__init__.py", line 348, in __init__
E self._handle = _dlopen(self._name, mode)
E OSError: [WinError 126] 找不到指定的模块。
E Current device id is: TS018083201100586
E Devices connected:
E ['TS018083201100586']
Init runtime environment failed
相关代码:
# Create RKNN Object
rknn = RKNN(verbose=True)
# Get devices list
rknn.list_devices()
# Load model
print('--> Loading model')
ret = rknn.load_rknn(path='./yolov3.rknn')
if ret != 0:
print('Load model failed!')
exit(ret)
print('done')
# init runtime environment
print('--> Init runtime environment')
ret = rknn.init_runtime(target='rk1808', device_id='TS018083201100586')
if ret != 0:
print('Init runtime environment failed')
exit(ret)
print('done')
|
|