|
本帖最后由 yaowei 于 2019-5-24 11:04 编辑
平台:开发板
RKNN 版本:0.9.9
相关代码:
- arcface_net = RKNN()
- print('--> Loading model')
- ret = arcface_net.load_rknn(path='./ArcFace/resnet100.rknn')
- if ret != 0:
- print('Load arcface model failed!')
- exit(ret)
- print('done')
- print('--> Init runtime environment')
- ret = arcface_net.init_runtime()
- if ret != 0:
- print('Init runtime environment failed')
- exit(ret)
- print('done')
- img = cv2.imread('./test.jpg')
- img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
- img = cv2.resize(img, (112,112))
- output = net.inference(inputs=[img])
错误信息:
- E Catch exception when init model!
- T Traceback (most recent call last):
- T File "rknn/api/rknn_base.py", line 625, in rknn.api.rknn_base.RKNNBase.inference
- T File "rknn/api/rknn_runtime.py", line 275, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
- T Exception: RKNN init failed. error code: RKNN_ERR_MODEL_INVALID
错误是发生在“output = net.inference(inputs=[img])”这句上,前面都没有报错
|
|