|
发表于 2021-9-9 14:54:29
只看该作者
5#
我在最新的固件上测试,没有问题。
demo:rknn-toolkit/examples/caffe/mobilenet_v2
rknn-toolkit version: 1.6.1
print:
--> Init runtime environment
I NPUTransfer: Starting NPU Transfer Client, Transfer version 2.1.0 (b5861e7@2020-11-23T11:50:36)
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI: API: 1.6.1 (f78b668 build: 2021-05-17 16:29:58)
D RKNNAPI: DRV: 1.6.0 (159d2d3 build: 2021-01-12 17:29:40)
D RKNNAPI: ==============================================
done
--> Running model
mobilenet_v2
-----TOP 5-----
[1]: 0.71923828125
[115]: 0.035552978515625
[996]: 0.03277587890625
[927]: 0.03021240234375
[794]: 0.023681640625
done
--> Evaluate model performance
W When performing performance evaluation, inputs can be set to None to use fake inputs.
========================================================================
Performance
========================================================================
Total Time(us): 3511
FPS: 284.82
========================================================================
diff:
(vir36) [daijh@daijh-pc mobilenet_v2]$ git diff -- ./
diff --git a/examples/caffe/mobilenet_v2/test.py b/examples/caffe/mobilenet_v2/test.py
old mode 100644
new mode 100755
index ba9ae91..325955d
--- a/examples/caffe/mobilenet_v2/test.py
+++ b/examples/caffe/mobilenet_v2/test.py
@@ -28,7 +28,7 @@ if __name__ == '__main__':
# Set model config
print('--> Config model')
- rknn.config(mean_values=[[103.94, 116.78, 123.68]], std_values=[[58.82, 58.82, 58.82]], reorder_channel='2 1 0')
+ rknn.config(mean_values=[[103.94, 116.78, 123.68]], std_values=[[58.82, 58.82, 58.82]], reorder_channel='2 1 0',target_platform=['rv1126'])
print('done')
# Load caffe model
@@ -62,7 +62,7 @@ if __name__ == '__main__':
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
print('--> Init runtime environment')
- ret = rknn.init_runtime()
+ ret = rknn.init_runtime(target='rv1126')
if ret != 0:
print('Init runtime environment failed')
exit(ret)
|
|