- 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
复制代码
yaowei 发表于 2019-5-24 16:36
这是据悉可运行的一个模型;我在1.0.0上也重新转换权重也试过,有其他错误;所以先把这个错误放上来看看, ...
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |