Toybrick
标题:
rk1808 rknn.inference的推理结果和原模型推理结果不一样
[打印本页]
作者:
afson
时间:
2021-6-10 16:09
标题:
rk1808 rknn.inference的推理结果和原模型推理结果不一样
本帖最后由 afson 于 2021-6-10 16:29 编辑
原pytorch模型转换成RKNN模型,转换运行在 Linux PC运行结果:
--> Init runtime environment
done
--> Running model
-2.3780515 -1.7105283 0.208601 0.5840828 0.7926838 0.3754818
-----TOP 5-----
[444]: 0.05922744423151016
[880]: 0.05012422427535057
[612]: 0.04068678990006447
[523]: 0.037429649382829666
[791]: 0.034433238208293915
[870]: 0.027950115501880646
done
跑在RK1808运行的结果:这里有1千个float输出。
rknn_outputs_get! get output_size = [4000], but expect 4000!
buffer:
-2.378052 -1.710528 0.208601 0.584083 0.792684 0.375482 1.084725 0.584083 -0.584083 -0.292042 0.458922 -0.500643 -0.083441 0.166881 0.125160 0.750963 0.083440 0.500642 1.001285 -0.458922 -0.584083 0.125160 -0.333762 0.166881 -0.208601 -3.337616 -1.376767 -3.212456 -3.838259 -1.293326 -0.125161 -2.628373 -1.168166 -0.292042 -0.917845 -2.044290 -0.625803 -1.501927 0.083440 1.543647 1.209886 1.752248 -0.625803 0.333761 1.126445 -0.584083 1.460207 0.584083 1.335046 -0.876124 1.293326 0.500642 -1.793969 -2.294611 -1.001285 -1.126446 -1.251606 -1.835689 0.542362 -0.041720 0.208601 -0.667523 0.041720 0.083440 0.041720 -0.625803 -1.168166 1.251606 -0.250321 -2.044290 -3.254176 -0.542363 -0.917845 -1.043005 -1.460207 -2.127730 -1.668808 -0.375482 -2.670093 -2.753533 -1.043005 -0.542363 1.543647 0.083440 1.251606 1.335046 1.001285 -0.292042 -0.876124 -0.584083 -2.419772 0.333761 -0.000000 -0.709244 0.500642 -1.376767 -0.542363 -1.168166 -2.169451 -0.375482 -2.836974 0.208601 -1.752249 -2.294611 0.625803 -2.086010 -2.002570 -2.086010 -2.878694 -0.959565 -4.630942 -0.000000 0.542362 -2.211171 -2.711813 -4.756103 -3.379336 -1.543648 -0.625803 -2.628373 -1.543648 -1.251606 -2.211171 -1.043005 0.166881 -2.169451 -2.503212 -1.460207 -0.417202 -0.166881 -2.086010 0.917844 0.667523 1.710528 0.041720 0.208601 -1.251606 -0.083441 1.209886 0.417202 0.083440 -1.126446 0.959564 -2.169451 -1.293326 -0.750964 -1.001285 -2.544932 0.500642 -0.292042 -1.043005 0.917844 -2.378052 -2.169451 -1.335047 -1.043005 0.417202 -1.293326 -0.542363 -0.166881 0.917844 1.835689 2.002569 1.877409 1.501927 -0.041720 1.835689 0.667523 0.500642 0.542362 0.917844 1.668808 2.169450 1.710528 0.083440 -2.169451 1.251606 0.792684 0.208601 0.333761 0.375482 -0.458922 -0.458922 -0.876124 -0.584083 -1.793969 -1.835689 -2.044290 -0.542363 -1.668808 -2.670093 -0.250321 -1.126446 -2.002570 -2.211171 0.458922 -1.585368 -0.458922 -1.126446 -0.876124 -1.919129 -2.169451 0.500642 -1.168166 -1.376767 -1.585368 -0.542363 -0.000000 0.041720 0.750963 -0.500643 0.083440 0.333761 0.333761 -0.125161 0.709243 -1.710528 -0.041720 -0.292042 -0.417202 -2.169451
.........此处省略。
这个是检测算法模型,本来的输出格式如下:
0 0.943490 0.121759 0.082812 0.075000 0.98
0 0.137240 0.093981 0.099479 0.087963 0.86
0 0.166667 0.073148 0.070833 0.068519 0.95
0 0.214323 0.025463 0.055729 0.049074 0.92
问题:
1. 转换后的rknn模型推理结果outputs那么多,和原算法模型的输出不一样。
2. rknn模型的推理结果TOP5是怎么看的,那些值是啥意思。
3.rknn模型的推理结果1千个,怎么分析的呢。
作者:
afson
时间:
2021-6-16 16:24
pytorch算法模型转换成rknn的算法模型,其中
rknn.config(mean_values=[[123.675, 116.28, 103.53]], std_values=[[58.395, 58.395, 58.395]], reorder_channel='0 1 2')
mean_values ,std_values 这两个值的设定,对rknn的转换影响大吗?
这两个值具体是根据什么配置的呢?
求解答。
欢迎光临 Toybrick (https://t.rock-chips.com/)
Powered by Discuz! X3.3