[开发板]001瑞芯微3588s开发记录--装一个仿真环境

news2024/12/27 6:57:18

文章目录

  • 前言
  • 1. 构建python环境
  • 2 模型转换


前言

我是一个开发板的新手,刚买了一个瑞芯微3588s的板子,目标是要学习嵌入式的开发,也就是说把深度学习的框架,跑到板子上。万丈高楼平地起步。先把仿真环境搭建起来。
仿真环境可以跑在ubuntu的机器上,但仿真环境只能运行python代码,而真是的3588s的板子是既能跑c/c++代码又能跑python代码。


1. 构建python环境

安装python环境

conda create -n rknnpy38 python=3.8
conda activate rknnpy38

git 仓库:https://github.com/rockchip-linux/rknn-toolkit2
到这里下载代码

  614  cd /home/ubuntu/Downloads/rknn-toolkit2-master/doc
  615  pip install -r requirements_cp38-1.5.0.txt 
cd  /home/ubuntu/Downloads/rknn-toolkit2-master/examples/onnx/yolov5

rknnpy38) ubuntu@ubuntu:~/Downloads/rknn-toolkit2-master/examples/onnx/yolov5$ python test.py 
W __init__: rknn-toolkit2 version: 1.5.0+1fa95b5c
--> Config model
W config: 'target_platform' is None, use rk3566 as default, Please set according to the actual platform!
done
--> Loading model
Loading : 100%|████████████████████████████████████████████████| 124/124 [00:00<00:00, 26012.49it/s]
done
--> Building model
I base_optimize ...
I base_optimize done.
I 
I fold_constant ...
I fold_constant done.
I 
I correct_ops ...
I correct_ops done.
I 
I fuse_ops ...
I fuse_ops results:
I     convert_resize_to_deconv: remove node = ['Resize_84'], add node = ['Resize_84_2deconv']
I     convert_resize_to_deconv: remove node = ['Resize_100'], add node = ['Resize_100_2deconv']
I     fold_constant ...
I     fold_constant done.
I fuse_ops done.
I 
I sparse_weight ...
I sparse_weight done.
I 
Analysing : 100%|███████████████████████████████████████████████| 142/142 [00:00<00:00, 6658.07it/s]
Quantizating : 100%|█████████████████████████████████████████████| 142/142 [00:01<00:00, 113.40it/s]
I 
I quant_optimizer ...
I quant_optimizer results:
I     adjust_relu: ['Relu_140', 'Relu_137', 'Relu_135', 'Relu_133', 'Relu_131', 'Relu_128', 'Relu_126', 'Relu_123', 'Relu_121', 'Relu_119', 'Relu_117', 'Relu_114', 'Relu_112', 'Relu_109', 'Relu_107', 'Relu_105', 'Relu_103', 'Relu_98', 'Relu_96', 'Relu_93', 'Relu_91', 'Relu_89', 'Relu_87', 'Relu_82', 'Relu_80', 'Relu_74', 'Relu_72', 'Relu_69', 'Relu_66', 'Relu_64', 'Relu_62', 'Relu_60', 'Relu_58', 'Relu_55', 'Relu_52', 'Relu_50', 'Relu_47', 'Relu_45', 'Relu_42', 'Relu_40', 'Relu_38', 'Relu_36', 'Relu_34', 'Relu_31', 'Relu_28', 'Relu_26', 'Relu_23', 'Relu_21', 'Relu_19', 'Relu_17', 'Relu_15', 'Relu_12', 'Relu_9', 'Relu_7', 'Relu_5', 'Relu_3', 'Relu_1']
I     adjust_no_change_node: ['MaxPool_77']
I quant_optimizer done.
I 
W build: The default input dtype of 'images' is changed from 'float32' to 'int8' in rknn model for performance!
                       Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '269' is changed from 'float32' to 'int8' in rknn model for performance!
                      Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '271' is changed from 'float32' to 'int8' in rknn model for performance!
                      Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '273' is changed from 'float32' to 'int8' in rknn model for performance!
                      Please take care of this change when deploy rknn model with Runtime API!
I rknn building ...
I RKNN: [23:18:44.124] compress = 0, conv_eltwise_activation_fuse = 1, global_fuse = 1, multi-core-model-mode = 7, output_optimize = 1,enable_argb_group=0
I RKNN: librknnc version: 1.5.0 (e6fe0c678@2023-05-25T16:15:03)
D RKNN: [23:18:44.163] RKNN is invoked
D RKNN: [23:18:44.244] >>>>>> start: N4rknn19RKNNSetOpTargetPassE
D RKNN: [23:18:44.244] <<<<<<<< end: N4rknn19RKNNSetOpTargetPassE
D RKNN: [23:18:44.244] >>>>>> start: N4rknn16RKNNAddFirstConvE
D RKNN: [23:18:44.244] <<<<<<<< end: N4rknn16RKNNAddFirstConvE
D RKNN: [23:18:44.244] >>>>>> start: N4rknn27RKNNEliminateQATDataConvertE
D RKNN: [23:18:44.244] <<<<<<<< end: N4rknn27RKNNEliminateQATDataConvertE
D RKNN: [23:18:44.244] >>>>>> start: N4rknn17RKNNTileGroupConvE
D RKNN: [23:18:44.244] <<<<<<<< end: N4rknn17RKNNTileGroupConvE
D RKNN: [23:18:44.244] >>>>>> start: N4rknn19RKNNTileFcBatchFuseE
D RKNN: [23:18:44.244] <<<<<<<< end: N4rknn19RKNNTileFcBatchFuseE
D RKNN: [23:18:44.244] >>>>>> start: N4rknn15RKNNAddConvBiasE
D RKNN: [23:18:44.245] <<<<<<<< end: N4rknn15RKNNAddConvBiasE
D RKNN: [23:18:44.245] >>>>>> start: N4rknn15RKNNTileChannelE
D RKNN: [23:18:44.245] <<<<<<<< end: N4rknn15RKNNTileChannelE
D RKNN: [23:18:44.245] >>>>>> start: N4rknn18RKNNPerChannelPrepE
D RKNN: [23:18:44.245] <<<<<<<< end: N4rknn18RKNNPerChannelPrepE
D RKNN: [23:18:44.245] >>>>>> start: N4rknn11RKNNBnQuantE
D RKNN: [23:18:44.245] <<<<<<<< end: N4rknn11RKNNBnQuantE
D RKNN: [23:18:44.245] >>>>>> start: N4rknn21RKNNFuseOptimizerPassE
D RKNN: [23:18:44.246] <<<<<<<< end: N4rknn21RKNNFuseOptimizerPassE
D RKNN: [23:18:44.246] >>>>>> start: N4rknn15RKNNTurnAutoPadE
D RKNN: [23:18:44.246] <<<<<<<< end: N4rknn15RKNNTurnAutoPadE
D RKNN: [23:18:44.246] >>>>>> start: N4rknn16RKNNInitRNNConstE
D RKNN: [23:18:44.246] <<<<<<<< end: N4rknn16RKNNInitRNNConstE
D RKNN: [23:18:44.246] >>>>>> start: N4rknn17RKNNInitCastConstE
D RKNN: [23:18:44.246] <<<<<<<< end: N4rknn17RKNNInitCastConstE
D RKNN: [23:18:44.246] >>>>>> start: N4rknn20RKNNMultiSurfacePassE
D RKNN: [23:18:44.246] <<<<<<<< end: N4rknn20RKNNMultiSurfacePassE
D RKNN: [23:18:44.246] >>>>>> start: OpEmit
D RKNN: [23:18:44.247] <<<<<<<< end: OpEmit
D RKNN: [23:18:44.247] >>>>>> start: N4rknn19RKNNLayoutMatchPassE
D RKNN: [23:18:44.247] >>>>>> start: N4rknn20RKNNAddSecondaryNodeE
D RKNN: [23:18:44.247] <<<<<<<< end: N4rknn20RKNNAddSecondaryNodeE
D RKNN: [23:18:44.247] >>>>>> start: OpEmit
D RKNN: [23:18:44.250] <<<<<<<< end: OpEmit
D RKNN: [23:18:44.250] >>>>>> start: N4rknn23RKNNProfileAnalysisPassE
D RKNN: [23:18:44.250] <<<<<<<< end: N4rknn23RKNNProfileAnalysisPassE
D RKNN: [23:18:44.251] >>>>>> start: N4rknn21RKNNOperatorIdGenPassE
D RKNN: [23:18:44.251] <<<<<<<< end: N4rknn21RKNNOperatorIdGenPassE
D RKNN: [23:18:44.251] >>>>>> start: N4rknn23RKNNWeightTransposePassE
D RKNN: [23:18:44.385] <<<<<<<< end: N4rknn23RKNNWeightTransposePassE
D RKNN: [23:18:44.385] >>>>>> start: N4rknn26RKNNCPUWeightTransposePassE
D RKNN: [23:18:44.385] <<<<<<<< end: N4rknn26RKNNCPUWeightTransposePassE
D RKNN: [23:18:44.385] >>>>>> start: N4rknn18RKNNModelBuildPassE
D RKNN: [23:18:44.617] RKNNModelBuildPass: [Statistics]
D RKNN: [23:18:44.617] total_regcfg_size     :    299856
D RKNN: [23:18:44.617] total_diff_regcfg_size:    164496
D RKNN: [23:18:44.618] ID   OpType           DataType Target InputShape                                   OutputShape            DDR Cycles     NPU Cycles     Total Cycles   Time(us)       MacUsage(%)    Task Number    Task Size      Regcmd Size    RW(KB)         FullName        
D RKNN: [23:18:44.618] 0    InputOperator    INT8     CPU    \                                            (1,3,640,640)          0              0              0              0              \              0              0              0              1200.00        InputOperator:images
D RKNN: [23:18:44.618] 1    ConvRelu         INT8     NPU    (1,3,640,640),(32,3,6,6),(32)                (1,32,320,320)         0              0              0              0              \              16             9440           10240          4409.25        Conv:Conv_0     
D RKNN: [23:18:44.618] 2    ConvRelu         INT8     NPU    (1,32,320,320),(64,32,3,3),(64)              (1,64,160,160)         0              0              0              0              \              16             4664           5760           4818.50        Conv:Conv_2     
D RKNN: [23:18:44.618] 3    ConvRelu         INT8     NPU    (1,64,160,160),(32,64,1,1),(32)              (1,32,160,160)         0              0              0              0              \              8              3208           3712           2402.25        Conv:Conv_4     
D RKNN: [23:18:44.618] 4    ConvRelu         INT8     NPU    (1,32,160,160),(32,32,1,1),(32)              (1,32,160,160)         0              0              0              0              \              4              2504           2688           1601.25        Conv:Conv_6     
D RKNN: [23:18:44.618] 5    ConvReluAdd      INT8     NPU    (1,32,160,160),(32,32,3,3),(32),(1,32,160,160) (1,32,160,160)         0              0              0              0              \              4              2560           2688           2409.25        Conv:Conv_8     
D RKNN: [23:18:44.618] 6    ConvRelu         INT8     NPU    (1,64,160,160),(32,64,1,1),(32)              (1,32,160,160)         0              0              0              0              \              8              3208           3712           2402.25        Conv:Conv_11    
D RKNN: [23:18:44.618] 7    Concat           INT8     NPU    (1,32,160,160),(1,32,160,160)                (1,64,160,160)         0              0              0              0              \              2              1104           1280           3200.00        Concat:Concat_13
D RKNN: [23:18:44.618] 8    ConvRelu         INT8     NPU    (1,64,160,160),(64,64,1,1),(64)              (1,64,160,160)         0              0              0              0              \              8              3208           3712           3204.50        Conv:Conv_14    
D RKNN: [23:18:44.618] 9    ConvRelu         INT8     NPU    (1,64,160,160),(128,64,3,3),(128)            (1,128,80,80)          0              0              0              0              \              8              3256           3712           2473.00        Conv:Conv_16    
D RKNN: [23:18:44.618] 10   ConvRelu         INT8     NPU    (1,128,80,80),(64,128,1,1),(64)              (1,64,80,80)           0              0              0              0              \              4              2504           2688           1208.50        Conv:Conv_18    
D RKNN: [23:18:44.618] 11   ConvRelu         INT8     NPU    (1,64,80,80),(64,64,1,1),(64)                (1,64,80,80)           0              0              0              0              \              2              2112           2176           804.50         Conv:Conv_20    
D RKNN: [23:18:44.618] 12   ConvReluAdd      INT8     NPU    (1,64,80,80),(64,64,3,3),(64),(1,64,80,80)   (1,64,80,80)           0              0              0              0              \              2              2112           2176           1236.50        Conv:Conv_22    
D RKNN: [23:18:44.618] 13   ConvRelu         INT8     NPU    (1,64,80,80),(64,64,1,1),(64)                (1,64,80,80)           0              0              0              0              \              2              2112           2176           804.50         Conv:Conv_25    
D RKNN: [23:18:44.618] 14   ConvReluAdd      INT8     NPU    (1,64,80,80),(64,64,3,3),(64),(1,64,80,80)   (1,64,80,80)           0              0              0              0              \              2              2112           2176           1236.50        Conv:Conv_27    
D RKNN: [23:18:44.618] 15   ConvRelu         INT8     NPU    (1,128,80,80),(64,128,1,1),(64)              (1,64,80,80)           0              0              0              0              \              4              2504           2688           1208.50        Conv:Conv_30    
D RKNN: [23:18:44.618] 16   Concat           INT8     NPU    (1,64,80,80),(1,64,80,80)                    (1,128,80,80)          0              0              0              0              \              2              1104           1280           1600.00        Concat:Concat_32
D RKNN: [23:18:44.618] 17   ConvRelu         INT8     NPU    (1,128,80,80),(128,128,1,1),(128)            (1,128,80,80)          0              0              0              0              \              4              2504           2688           1617.00        Conv:Conv_33    
D RKNN: [23:18:44.618] 18   ConvRelu         INT8     NPU    (1,128,80,80),(256,128,3,3),(256)            (1,256,40,40)          0              0              0              0              \              4              2552           2688           1490.00        Conv:Conv_35    
D RKNN: [23:18:44.618] 19   ConvRelu         INT8     NPU    (1,256,40,40),(128,256,1,1),(128)            (1,128,40,40)          0              0              0              0              \              2              2112           2176           633.00         Conv:Conv_37    
D RKNN: [23:18:44.618] 20   ConvRelu         INT8     NPU    (1,128,40,40),(128,128,1,1),(128)            (1,128,40,40)          0              0              0              0              \              1              1056           1088           417.00         Conv:Conv_39    
D RKNN: [23:18:44.618] 21   ConvReluAdd      INT8     NPU    (1,128,40,40),(128,128,3,3),(128),(1,128,40,40) (1,128,40,40)          0              0              0              0              \              1              1056           1088           745.00         Conv:Conv_41    
D RKNN: [23:18:44.618] 22   ConvRelu         INT8     NPU    (1,128,40,40),(128,128,1,1),(128)            (1,128,40,40)          0              0              0              0              \              1              1056           1088           417.00         Conv:Conv_44    
D RKNN: [23:18:44.618] 23   ConvReluAdd      INT8     NPU    (1,128,40,40),(128,128,3,3),(128),(1,128,40,40) (1,128,40,40)          0              0              0              0              \              1              1056           1088           745.00         Conv:Conv_46    
D RKNN: [23:18:44.618] 24   ConvRelu         INT8     NPU    (1,128,40,40),(128,128,1,1),(128)            (1,128,40,40)          0              0              0              0              \              1              1056           1088           417.00         Conv:Conv_49    
D RKNN: [23:18:44.618] 25   ConvReluAdd      INT8     NPU    (1,128,40,40),(128,128,3,3),(128),(1,128,40,40) (1,128,40,40)          0              0              0              0              \              1              1056           1088           745.00         Conv:Conv_51    
D RKNN: [23:18:44.618] 26   ConvRelu         INT8     NPU    (1,256,40,40),(128,256,1,1),(128)            (1,128,40,40)          0              0              0              0              \              2              2112           2176           633.00         Conv:Conv_54    
D RKNN: [23:18:44.618] 27   Concat           INT8     NPU    (1,128,40,40),(1,128,40,40)                  (1,256,40,40)          0              0              0              0              \              2              1104           1280           800.00         Concat:Concat_56
D RKNN: [23:18:44.618] 28   ConvRelu         INT8     NPU    (1,256,40,40),(256,256,1,1),(256)            (1,256,40,40)          0              0              0              0              \              4              2544           2688           866.00         Conv:Conv_57    
D RKNN: [23:18:44.618] 29   ConvRelu         INT8     NPU    (1,256,40,40),(512,256,3,3),(512)            (1,512,20,20)          0              0              0              0              \              3              2336           2432           1756.00        Conv:Conv_59    
D RKNN: [23:18:44.618] 30   ConvRelu         INT8     NPU    (1,512,20,20),(256,512,1,1),(256)            (1,256,20,20)          0              0              0              0              \              4              2464           2688           430.00         Conv:Conv_61    
D RKNN: [23:18:44.618] 31   ConvRelu         INT8     NPU    (1,256,20,20),(256,256,1,1),(256)            (1,256,20,20)          0              0              0              0              \              1              1056           1088           266.00         Conv:Conv_63    
D RKNN: [23:18:44.618] 32   ConvReluAdd      INT8     NPU    (1,256,20,20),(256,256,3,3),(256),(1,256,20,20) (1,256,20,20)          0              0              0              0              \              1              1056           1088           878.00         Conv:Conv_65    
D RKNN: [23:18:44.618] 33   ConvRelu         INT8     NPU    (1,512,20,20),(256,512,1,1),(256)            (1,256,20,20)          0              0              0              0              \              4              2464           2688           430.00         Conv:Conv_68    
D RKNN: [23:18:44.618] 34   Concat           INT8     NPU    (1,256,20,20),(1,256,20,20)                  (1,512,20,20)          0              0              0              0              \              2              1104           1280           400.00         Concat:Concat_70
D RKNN: [23:18:44.618] 35   ConvRelu         INT8     NPU    (1,512,20,20),(512,512,1,1),(512)            (1,512,20,20)          0              0              0              0              \              8              3168           3712           660.00         Conv:Conv_71    
D RKNN: [23:18:44.618] 36   ConvRelu         INT8     NPU    (1,512,20,20),(256,512,1,1),(256)            (1,256,20,20)          0              0              0              0              \              4              2464           2688           430.00         Conv:Conv_73    
D RKNN: [23:18:44.618] 37   MaxPool          INT8     NPU    (1,256,20,20)                                (1,256,20,20)          0              0              0              0              \              2              464            640            200.00         MaxPool:MaxPool_75
D RKNN: [23:18:44.618] 38   MaxPool          INT8     NPU    (1,256,20,20)                                (1,256,20,20)          0              0              0              0              \              2              464            640            200.00         MaxPool:MaxPool_76
D RKNN: [23:18:44.618] 39   MaxPool          INT8     NPU    (1,256,20,20)                                (1,256,20,20)          0              0              0              0              \              2              464            640            200.00         MaxPool:MaxPool_77
D RKNN: [23:18:44.618] 40   Concat           INT8     NPU    (1,256,20,20),(1,256,20,20),(1,256,20,20),(1,256,20,20) (1,1024,20,20)         0              0              0              0              \              4              1216           1536           800.00         Concat:Concat_78
D RKNN: [23:18:44.618] 41   ConvRelu         INT8     NPU    (1,1024,20,20),(512,1024,1,1),(512)          (1,512,20,20)          0              0              0              0              \              32             7472           9856           1116.00        Conv:Conv_79    
D RKNN: [23:18:44.618] 42   ConvRelu         INT8     NPU    (1,512,20,20),(256,512,1,1),(256)            (1,256,20,20)          0              0              0              0              \              4              2464           2688           430.00         Conv:Conv_81    
D RKNN: [23:18:44.618] 43   ConvTranspose    INT8     NPU    (1,256,20,20),(256,1,4,4),(256)              (1,256,40,40)          0              0              0              0              \              1              1056           1088           506.00         ConvTranspose:Resize_84_2deconv
D RKNN: [23:18:44.618] 44   Concat           INT8     NPU    (1,256,40,40),(1,256,40,40)                  (1,512,40,40)          0              0              0              0              \              2              1104           1280           1600.00        Concat:Concat_85
D RKNN: [23:18:44.618] 45   ConvRelu         INT8     NPU    (1,512,40,40),(128,512,1,1),(128)            (1,128,40,40)          0              0              0              0              \              8              3248           3712           1065.00        Conv:Conv_86    
D RKNN: [23:18:44.618] 46   ConvRelu         INT8     NPU    (1,128,40,40),(128,128,1,1),(128)            (1,128,40,40)          0              0              0              0              \              1              1056           1088           417.00         Conv:Conv_88    
D RKNN: [23:18:44.618] 47   ConvRelu         INT8     NPU    (1,128,40,40),(128,128,3,3),(128)            (1,128,40,40)          0              0              0              0              \              1              1056           1088           545.00         Conv:Conv_90    
D RKNN: [23:18:44.618] 48   ConvRelu         INT8     NPU    (1,512,40,40),(128,512,1,1),(128)            (1,128,40,40)          0              0              0              0              \              8              3248           3712           1065.00        Conv:Conv_92    
D RKNN: [23:18:44.618] 49   Concat           INT8     NPU    (1,128,40,40),(1,128,40,40)                  (1,256,40,40)          0              0              0              0              \              2              1104           1280           800.00         Concat:Concat_94
D RKNN: [23:18:44.618] 50   ConvRelu         INT8     NPU    (1,256,40,40),(256,256,1,1),(256)            (1,256,40,40)          0              0              0              0              \              4              2544           2688           866.00         Conv:Conv_95    
D RKNN: [23:18:44.618] 51   ConvRelu         INT8     NPU    (1,256,40,40),(128,256,1,1),(128)            (1,128,40,40)          0              0              0              0              \              2              2112           2176           633.00         Conv:Conv_97    
D RKNN: [23:18:44.618] 52   ConvTranspose    INT8     NPU    (1,128,40,40),(128,1,4,4),(128)              (1,128,80,80)          0              0              0              0              \              1              1056           1088           1003.00        ConvTranspose:Resize_100_2deconv
D RKNN: [23:18:44.618] 53   Concat           INT8     NPU    (1,128,80,80),(1,128,80,80)                  (1,256,80,80)          0              0              0              0              \              2              1104           1280           3200.00        Concat:Concat_101
D RKNN: [23:18:44.618] 54   ConvRelu         INT8     NPU    (1,256,80,80),(64,256,1,1),(64)              (1,64,80,80)           0              0              0              0              \              8              3208           3712           2016.50        Conv:Conv_102   
D RKNN: [23:18:44.618] 55   ConvRelu         INT8     NPU    (1,64,80,80),(64,64,1,1),(64)                (1,64,80,80)           0              0              0              0              \              2              2112           2176           804.50         Conv:Conv_104   
D RKNN: [23:18:44.618] 56   ConvRelu         INT8     NPU    (1,64,80,80),(64,64,3,3),(64)                (1,64,80,80)           0              0              0              0              \              2              2112           2176           836.50         Conv:Conv_106   
D RKNN: [23:18:44.618] 57   ConvRelu         INT8     NPU    (1,256,80,80),(64,256,1,1),(64)              (1,64,80,80)           0              0              0              0              \              8              3208           3712           2016.50        Conv:Conv_108   
D RKNN: [23:18:44.618] 58   Concat           INT8     NPU    (1,64,80,80),(1,64,80,80)                    (1,128,80,80)          0              0              0              0              \              2              1104           1280           1600.00        Concat:Concat_110
D RKNN: [23:18:44.618] 59   ConvRelu         INT8     NPU    (1,128,80,80),(128,128,1,1),(128)            (1,128,80,80)          0              0              0              0              \              4              2504           2688           1617.00        Conv:Conv_111   
D RKNN: [23:18:44.618] 60   Conv             INT8     NPU    (1,128,80,80),(255,128,1,1),(255)            (1,255,80,80)          0              0              0              0              \              4              2504           2688           2433.88        Conv:Conv_141   
D RKNN: [23:18:44.618] 61   OutputOperator   INT8     CPU    (1,255,80,80)                                \                      0              0              0              0              \              0              0              0              1600.00        OutputOperator:269
D RKNN: [23:18:44.618] 62   ConvRelu         INT8     NPU    (1,128,80,80),(128,128,3,3),(128)            (1,128,40,40)          0              0              0              0              \              4              2552           2688           1145.00        Conv:Conv_113   
D RKNN: [23:18:44.618] 63   Concat           INT8     NPU    (1,128,40,40),(1,128,40,40)                  (1,256,40,40)          0              0              0              0              \              2              1104           1280           800.00         Concat:Concat_115
D RKNN: [23:18:44.618] 64   ConvRelu         INT8     NPU    (1,256,40,40),(128,256,1,1),(128)            (1,128,40,40)          0              0              0              0              \              2              2112           2176           633.00         Conv:Conv_116   
D RKNN: [23:18:44.618] 65   ConvRelu         INT8     NPU    (1,128,40,40),(128,128,1,1),(128)            (1,128,40,40)          0              0              0              0              \              1              1056           1088           417.00         Conv:Conv_118   
D RKNN: [23:18:44.618] 66   ConvRelu         INT8     NPU    (1,128,40,40),(128,128,3,3),(128)            (1,128,40,40)          0              0              0              0              \              1              1056           1088           545.00         Conv:Conv_120   
D RKNN: [23:18:44.618] 67   ConvRelu         INT8     NPU    (1,256,40,40),(128,256,1,1),(128)            (1,128,40,40)          0              0              0              0              \              2              2112           2176           633.00         Conv:Conv_122   
D RKNN: [23:18:44.618] 68   Concat           INT8     NPU    (1,128,40,40),(1,128,40,40)                  (1,256,40,40)          0              0              0              0              \              2              1104           1280           800.00         Concat:Concat_124
D RKNN: [23:18:44.618] 69   ConvRelu         INT8     NPU    (1,256,40,40),(256,256,1,1),(256)            (1,256,40,40)          0              0              0              0              \              4              2544           2688           866.00         Conv:Conv_125   
D RKNN: [23:18:44.618] 70   Conv             INT8     NPU    (1,256,40,40),(255,256,1,1),(255)            (1,255,40,40)          0              0              0              0              \              4              2544           2688           865.75         Conv:Conv_143   
D RKNN: [23:18:44.618] 71   OutputOperator   INT8     CPU    (1,255,40,40)                                \                      0              0              0              0              \              0              0              0              400.00         OutputOperator:271
D RKNN: [23:18:44.618] 72   ConvRelu         INT8     NPU    (1,256,40,40),(256,256,3,3),(256)            (1,256,20,20)          0              0              0              0              \              3              2336           2432           1078.00        Conv:Conv_127   
D RKNN: [23:18:44.618] 73   Concat           INT8     NPU    (1,256,20,20),(1,256,20,20)                  (1,512,20,20)          0              0              0              0              \              2              1104           1280           400.00         Concat:Concat_129
D RKNN: [23:18:44.618] 74   ConvRelu         INT8     NPU    (1,512,20,20),(256,512,1,1),(256)            (1,256,20,20)          0              0              0              0              \              4              2464           2688           430.00         Conv:Conv_130   
D RKNN: [23:18:44.618] 75   ConvRelu         INT8     NPU    (1,256,20,20),(256,256,1,1),(256)            (1,256,20,20)          0              0              0              0              \              1              1056           1088           266.00         Conv:Conv_132   
D RKNN: [23:18:44.618] 76   ConvRelu         INT8     NPU    (1,256,20,20),(256,256,3,3),(256)            (1,256,20,20)          0              0              0              0              \              1              1056           1088           778.00         Conv:Conv_134   
D RKNN: [23:18:44.618] 77   ConvRelu         INT8     NPU    (1,512,20,20),(256,512,1,1),(256)            (1,256,20,20)          0              0              0              0              \              4              2464           2688           430.00         Conv:Conv_136   
D RKNN: [23:18:44.618] 78   Concat           INT8     NPU    (1,256,20,20),(1,256,20,20)                  (1,512,20,20)          0              0              0              0              \              2              1104           1280           400.00         Concat:Concat_138
D RKNN: [23:18:44.618] 79   ConvRelu         INT8     NPU    (1,512,20,20),(512,512,1,1),(512)            (1,512,20,20)          0              0              0              0              \              8              3168           3712           660.00         Conv:Conv_139   
D RKNN: [23:18:44.618] 80   Conv             INT8     NPU    (1,512,20,20),(255,512,1,1),(255)            (1,255,20,20)          0              0              0              0              \              4              2488           2688           429.50         Conv:Conv_145   
D RKNN: [23:18:44.618] 81   OutputOperator   INT8     CPU    (1,255,20,20)                                \                      0              0              0              0              \              0              0              0              100.00         OutputOperator:273
D RKNN: [23:18:44.618] <<<<<<<< end: N4rknn18RKNNModelBuildPassE
D RKNN: [23:18:44.618] >>>>>> start: N4rknn21RKNNMemStatisticsPassE
D RKNN: [23:18:44.619] ---------------------------------------------------------------------+---------------------------------
D RKNN: [23:18:44.619] ID  User           Tensor   DataType  OrigShape      NativeShape     |     [Start       End)       Size
D RKNN: [23:18:44.619] ---------------------------------------------------------------------+---------------------------------
D RKNN: [23:18:44.619] 1   ConvRelu       images   INT8      (1,3,640,640)  (1,1,640,640,3) | 0x00000000 0x0012c000 0x0012c000
D RKNN: [23:18:44.619] 2   ConvRelu       123      INT8      (1,32,320,320) (1,4,320,320,8) | 0x0012c000 0x0044c000 0x00320000
D RKNN: [23:18:44.619] 3   ConvRelu       125      INT8      (1,64,160,160) (1,8,160,160,8) | 0x0044c000*0x005dc000 0x00190000
D RKNN: [23:18:44.619] 4   ConvRelu       127      INT8      (1,32,160,160) (1,4,160,160,8) | 0x00000000 0x000c8000 0x000c8000
D RKNN: [23:18:44.619] 5   ConvReluAdd    129      INT8      (1,32,160,160) (1,4,160,160,8) | 0x000c8000 0x00190000 0x000c8000
D RKNN: [23:18:44.619] 5   ConvReluAdd    127      INT8      (1,32,160,160) (1,4,160,160,8) | 0x00000000 0x000c8000 0x000c8000
D RKNN: [23:18:44.619] 6   ConvRelu       125      INT8      (1,64,160,160) (1,8,160,160,8) | 0x0044c000*0x005dc000 0x00190000
D RKNN: [23:18:44.619] 7   Concat         132      INT8      (1,32,160,160) (1,4,160,160,8) | 0x00190000 0x00258000 0x000c8000
D RKNN: [23:18:44.619] 7   Concat         134      INT8      (1,32,160,160) (1,4,160,160,8) | 0x00000000 0x000c8000 0x000c8000
D RKNN: [23:18:44.619] 8   ConvRelu       135      INT8      (1,64,160,160) (1,8,160,160,8) | 0x00258000 0x003e8000 0x00190000
D RKNN: [23:18:44.619] 9   ConvRelu       137      INT8      (1,64,160,160) (1,8,160,160,8) | 0x00000000 0x00190000 0x00190000
D RKNN: [23:18:44.619] 10  ConvRelu       139      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x00190000 0x00258000 0x000c8000
D RKNN: [23:18:44.619] 11  ConvRelu       141      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00000000 0x00064000 0x00064000
D RKNN: [23:18:44.619] 12  ConvReluAdd    143      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00064000 0x000c8000 0x00064000
D RKNN: [23:18:44.619] 12  ConvReluAdd    141      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00000000 0x00064000 0x00064000
D RKNN: [23:18:44.619] 13  ConvRelu       146      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x000c8000 0x0012c000 0x00064000
D RKNN: [23:18:44.619] 14  ConvReluAdd    148      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x0012c000 0x00190000 0x00064000
D RKNN: [23:18:44.619] 14  ConvReluAdd    146      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x000c8000 0x0012c000 0x00064000
D RKNN: [23:18:44.619] 15  ConvRelu       139      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x00190000 0x00258000 0x000c8000
D RKNN: [23:18:44.619] 16  Concat         151      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00000000 0x00064000 0x00064000
D RKNN: [23:18:44.619] 16  Concat         153      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00064000 0x000c8000 0x00064000
D RKNN: [23:18:44.619] 17  ConvRelu       154      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x000c8000 0x00190000 0x000c8000
D RKNN: [23:18:44.619] 18  ConvRelu       156      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x00000000 0x000c8000 0x000c8000
D RKNN: [23:18:44.619] 19  ConvRelu       158      INT8      (1,256,40,40)  (1,32,40,40,8)  | 0x000c8000 0x0012c000 0x00064000
D RKNN: [23:18:44.619] 20  ConvRelu       160      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x0012c000 0x0015e000 0x00032000
D RKNN: [23:18:44.619] 21  ConvReluAdd    162      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x0015e000 0x00190000 0x00032000
D RKNN: [23:18:44.619] 21  ConvReluAdd    160      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x0012c000 0x0015e000 0x00032000
D RKNN: [23:18:44.619] 22  ConvRelu       165      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x00190000 0x001c2000 0x00032000
D RKNN: [23:18:44.619] 23  ConvReluAdd    167      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x0012c000 0x0015e000 0x00032000
D RKNN: [23:18:44.619] 23  ConvReluAdd    165      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x00190000 0x001c2000 0x00032000
D RKNN: [23:18:44.619] 24  ConvRelu       170      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x0015e000 0x00190000 0x00032000
D RKNN: [23:18:44.619] 25  ConvReluAdd    172      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x0012c000 0x0015e000 0x00032000
D RKNN: [23:18:44.619] 25  ConvReluAdd    170      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x0015e000 0x00190000 0x00032000
D RKNN: [23:18:44.619] 26  ConvRelu       158      INT8      (1,256,40,40)  (1,32,40,40,8)  | 0x000c8000 0x0012c000 0x00064000
D RKNN: [23:18:44.619] 27  Concat         175      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x00190000 0x001c2000 0x00032000
D RKNN: [23:18:44.619] 27  Concat         177      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x0012c000 0x0015e000 0x00032000
D RKNN: [23:18:44.619] 28  ConvRelu       178      INT8      (1,256,40,40)  (1,32,40,40,8)  | 0x000c8000 0x0012c000 0x00064000
D RKNN: [23:18:44.619] 29  ConvRelu       180      INT8      (1,256,40,40)  (1,35,40,40,8)  | 0x0012c000 0x00199920 0x0006d920
D RKNN: [23:18:44.619] 30  ConvRelu       182      INT8      (1,512,20,20)  (1,64,20,20,8)  | 0x000c8000 0x000fa000 0x00032000
D RKNN: [23:18:44.619] 31  ConvRelu       184      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x000fa000 0x00115648 0x0001b648
D RKNN: [23:18:44.619] 32  ConvReluAdd    186      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x00196400 0x001af400 0x00019000
D RKNN: [23:18:44.619] 32  ConvReluAdd    184      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x000fa000 0x00115648 0x0001b648
D RKNN: [23:18:44.619] 33  ConvRelu       182      INT8      (1,512,20,20)  (1,64,20,20,8)  | 0x000c8000 0x000fa000 0x00032000
D RKNN: [23:18:44.619] 34  Concat         189      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x001af400 0x001c8400 0x00019000
D RKNN: [23:18:44.619] 34  Concat         191      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x000fa000 0x00115648 0x0001b648
D RKNN: [23:18:44.619] 35  ConvRelu       192      INT8      (1,512,20,20)  (1,64,20,20,8)  | 0x000c8000 0x000fa000 0x00032000
D RKNN: [23:18:44.619] 36  ConvRelu       194      INT8      (1,512,20,20)  (1,67,20,20,8)  | 0x00196400 0x001ca9e0 0x000345e0
D RKNN: [23:18:44.619] 37  MaxPool        196      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x000c8000 0x000e3648 0x0001b648
D RKNN: [23:18:44.619] 38  MaxPool        197      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x000e2900 0x000fb900 0x00019000
D RKNN: [23:18:44.619] 39  MaxPool        198      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x000fb900 0x00114900 0x00019000
D RKNN: [23:18:44.619] 40  Concat         196      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x000c8000 0x000e3648 0x0001b648
D RKNN: [23:18:44.619] 40  Concat         197      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x000e2900 0x000fb900 0x00019000
D RKNN: [23:18:44.619] 40  Concat         198      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x000fb900 0x00114900 0x00019000
D RKNN: [23:18:44.619] 40  Concat         199      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x00196400 0x001af400 0x00019000
D RKNN: [23:18:44.619] 41  ConvRelu       200      INT8      (1,1024,20,20) (1,128,20,20,8) | 0x001af400 0x00213400 0x00064000
D RKNN: [23:18:44.619] 42  ConvRelu       202      INT8      (1,512,20,20)  (1,67,20,20,8)  | 0x000c8000 0x000fc5e0 0x000345e0
D RKNN: [23:18:44.619] 43  ConvTranspose  204      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x000fb900 0x00116f48 0x0001b648
D RKNN: [23:18:44.619] 44  Concat         209      INT8      (1,256,40,40)  (1,32,40,40,8)  | 0x00196400 0x001fa400 0x00064000
D RKNN: [23:18:44.619] 44  Concat         180      INT8      (1,256,40,40)  (1,35,40,40,8)  | 0x0012c000 0x00199920 0x0006d920
D RKNN: [23:18:44.619] 45  ConvRelu       210      INT8      (1,512,40,40)  (1,64,40,40,8)  | 0x001fa400 0x002c2400 0x000c8000
D RKNN: [23:18:44.619] 46  ConvRelu       212      INT8      (1,128,40,40)  (1,19,40,40,8)  | 0x00116200 0x00151e40 0x0003bc40
D RKNN: [23:18:44.619] 47  ConvRelu       214      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x000c8000 0x000fa000 0x00032000
D RKNN: [23:18:44.619] 48  ConvRelu       210      INT8      (1,512,40,40)  (1,64,40,40,8)  | 0x001fa400 0x002c2400 0x000c8000
D RKNN: [23:18:44.619] 49  Concat         216      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x00116200 0x00148200 0x00032000
D RKNN: [23:18:44.619] 49  Concat         218      INT8      (1,128,40,40)  (1,19,40,40,8)  | 0x00148200 0x00183e40 0x0003bc40
D RKNN: [23:18:44.619] 50  ConvRelu       219      INT8      (1,256,40,40)  (1,32,40,40,8)  | 0x00180600 0x001e4600 0x00064000
D RKNN: [23:18:44.619] 51  ConvRelu       221      INT8      (1,256,40,40)  (1,35,40,40,8)  | 0x00116200 0x00183b20 0x0006d920
D RKNN: [23:18:44.619] 52  ConvTranspose  223      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x000c8000 0x000fa000 0x00032000
D RKNN: [23:18:44.619] 53  Concat         228      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x00116200 0x001de200 0x000c8000
D RKNN: [23:18:44.619] 53  Concat         156      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x00000000 0x000c8000 0x000c8000
D RKNN: [23:18:44.619] 54  ConvRelu       229      INT8      (1,256,80,80)  (1,32,80,80,8)  | 0x001de200 0x0036e200 0x00190000
D RKNN: [23:18:44.619] 55  ConvRelu       231      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00000000 0x00064000 0x00064000
D RKNN: [23:18:44.619] 56  ConvRelu       233      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00064000 0x000c8000 0x00064000
D RKNN: [23:18:44.619] 57  ConvRelu       229      INT8      (1,256,80,80)  (1,32,80,80,8)  | 0x001de200 0x0036e200 0x00190000
D RKNN: [23:18:44.619] 58  Concat         235      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00000000 0x00064000 0x00064000
D RKNN: [23:18:44.619] 58  Concat         237      INT8      (1,64,80,80)   (1,8,80,80,8)   | 0x00064000 0x000c8000 0x00064000
D RKNN: [23:18:44.619] 59  ConvRelu       238      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x00116200 0x001de200 0x000c8000
D RKNN: [23:18:44.619] 60  Conv           240      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x00000000 0x000c8000 0x000c8000
D RKNN: [23:18:44.619] 61  OutputOperator 269      INT8      (1,255,80,80)  (1,32,80,80,8)  | 0x00116200 0x002a6200 0x00190000
D RKNN: [23:18:44.619] 62  ConvRelu       240      INT8      (1,128,80,80)  (1,16,80,80,8)  | 0x00000000 0x000c8000 0x000c8000
D RKNN: [23:18:44.619] 63  Concat         242      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x002a6200 0x002d8200 0x00032000
D RKNN: [23:18:44.619] 63  Concat         223      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x000c8000 0x000fa000 0x00032000
D RKNN: [23:18:44.619] 64  ConvRelu       243      INT8      (1,256,40,40)  (1,32,40,40,8)  | 0x00000000 0x00064000 0x00064000
D RKNN: [23:18:44.619] 65  ConvRelu       245      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x00064000 0x00096000 0x00032000
D RKNN: [23:18:44.619] 66  ConvRelu       247      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x00096000 0x000c8000 0x00032000
D RKNN: [23:18:44.619] 67  ConvRelu       243      INT8      (1,256,40,40)  (1,32,40,40,8)  | 0x00000000 0x00064000 0x00064000
D RKNN: [23:18:44.619] 68  Concat         249      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x00064000 0x00096000 0x00032000
D RKNN: [23:18:44.619] 68  Concat         251      INT8      (1,128,40,40)  (1,16,40,40,8)  | 0x00096000 0x000c8000 0x00032000
D RKNN: [23:18:44.619] 69  ConvRelu       252      INT8      (1,256,40,40)  (1,32,40,40,8)  | 0x00000000 0x00064000 0x00064000
D RKNN: [23:18:44.619] 70  Conv           254      INT8      (1,256,40,40)  (1,35,40,40,8)  | 0x00064000 0x000d1920 0x0006d920
D RKNN: [23:18:44.619] 71  OutputOperator 271      INT8      (1,255,40,40)  (1,35,40,40,8)  | 0x002a6200 0x00313b50 0x0006d950
D RKNN: [23:18:44.619] 72  ConvRelu       254      INT8      (1,256,40,40)  (1,35,40,40,8)  | 0x00064000 0x000d1920 0x0006d920
D RKNN: [23:18:44.619] 73  Concat         256      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x000ce400 0x000e7400 0x00019000
D RKNN: [23:18:44.619] 73  Concat         204      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x000fb900 0x00116f48 0x0001b648
D RKNN: [23:18:44.619] 74  ConvRelu       257      INT8      (1,512,20,20)  (1,64,20,20,8)  | 0x00000000 0x00032000 0x00032000
D RKNN: [23:18:44.619] 75  ConvRelu       259      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x00032000 0x0004d648 0x0001b648
D RKNN: [23:18:44.619] 76  ConvRelu       261      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x0004c900 0x00065900 0x00019000
D RKNN: [23:18:44.619] 77  ConvRelu       257      INT8      (1,512,20,20)  (1,64,20,20,8)  | 0x00000000 0x00032000 0x00032000
D RKNN: [23:18:44.619] 78  Concat         263      INT8      (1,256,20,20)  (1,32,20,20,8)  | 0x00032000 0x0004b000 0x00019000
D RKNN: [23:18:44.619] 78  Concat         265      INT8      (1,256,20,20)  (1,35,20,20,8)  | 0x0004b000 0x00066648 0x0001b648
D RKNN: [23:18:44.619] 79  ConvRelu       266      INT8      (1,512,20,20)  (1,64,20,20,8)  | 0x00000000 0x00032000 0x00032000
D RKNN: [23:18:44.619] 80  Conv           268      INT8      (1,512,20,20)  (1,67,20,20,8)  | 0x00032000 0x000665e0 0x000345e0
D RKNN: [23:18:44.619] 81  OutputOperator 273      INT8      (1,255,20,20)  (1,35,20,20,8)  | 0x00000000 0x0001b650 0x0001b650
D RKNN: [23:18:44.619] ---------------------------------------------------------------------+---------------------------------
D RKNN: [23:18:44.619] ----------------------------------------------------------------------------+---------------------------------
D RKNN: [23:18:44.619] ID  User          Tensor                           DataType  OrigShape      |     [Start       End)       Size
D RKNN: [23:18:44.619] ----------------------------------------------------------------------------+---------------------------------
D RKNN: [23:18:44.619] 1   ConvRelu      model.0.conv.weight              INT8      (32,3,6,6)     | 0x00000000 0x00002400 0x00002400
D RKNN: [23:18:44.619] 1   ConvRelu      model.0.conv.bias                INT32     (32)           | 0x00002400 0x00002500 0x00000100
D RKNN: [23:18:44.619] 2   ConvRelu      model.1.conv.weight              INT8      (64,32,3,3)    | 0x00002500 0x00006d00 0x00004800
D RKNN: [23:18:44.619] 2   ConvRelu      model.1.conv.bias                INT32     (64)           | 0x00006d00 0x00006f00 0x00000200
D RKNN: [23:18:44.619] 3   ConvRelu      model.2.cv1.conv.weight          INT8      (32,64,1,1)    | 0x00006f00 0x00007700 0x00000800
D RKNN: [23:18:44.619] 3   ConvRelu      model.2.cv1.conv.bias            INT32     (32)           | 0x00007700 0x00007800 0x00000100
D RKNN: [23:18:44.619] 4   ConvRelu      model.2.m.0.cv1.conv.weight      INT8      (32,32,1,1)    | 0x00007800 0x00007c00 0x00000400
D RKNN: [23:18:44.619] 4   ConvRelu      model.2.m.0.cv1.conv.bias        INT32     (32)           | 0x00007c00 0x00007d00 0x00000100
D RKNN: [23:18:44.619] 5   ConvReluAdd   model.2.m.0.cv2.conv.weight      INT8      (32,32,3,3)    | 0x00007d00 0x0000a100 0x00002400
D RKNN: [23:18:44.619] 5   ConvReluAdd   model.2.m.0.cv2.conv.bias        INT32     (32)           | 0x0000a100 0x0000a200 0x00000100
D RKNN: [23:18:44.619] 6   ConvRelu      model.2.cv2.conv.weight          INT8      (32,64,1,1)    | 0x0000a200 0x0000aa00 0x00000800
D RKNN: [23:18:44.619] 6   ConvRelu      model.2.cv2.conv.bias            INT32     (32)           | 0x0000aa00 0x0000ab00 0x00000100
D RKNN: [23:18:44.619] 8   ConvRelu      model.2.cv3.conv.weight          INT8      (64,64,1,1)    | 0x0000ab00 0x0000bb00 0x00001000
D RKNN: [23:18:44.619] 8   ConvRelu      model.2.cv3.conv.bias            INT32     (64)           | 0x0000bb00 0x0000bd00 0x00000200
D RKNN: [23:18:44.619] 9   ConvRelu      model.3.conv.weight              INT8      (128,64,3,3)   | 0x0000bd00 0x0001dd00 0x00012000
D RKNN: [23:18:44.619] 9   ConvRelu      model.3.conv.bias                INT32     (128)          | 0x0001dd00 0x0001e100 0x00000400
D RKNN: [23:18:44.619] 10  ConvRelu      model.4.cv1.conv.weight          INT8      (64,128,1,1)   | 0x0001e100 0x00020100 0x00002000
D RKNN: [23:18:44.619] 10  ConvRelu      model.4.cv1.conv.bias            INT32     (64)           | 0x00020100 0x00020300 0x00000200
D RKNN: [23:18:44.619] 11  ConvRelu      model.4.m.0.cv1.conv.weight      INT8      (64,64,1,1)    | 0x00020300 0x00021300 0x00001000
D RKNN: [23:18:44.619] 11  ConvRelu      model.4.m.0.cv1.conv.bias        INT32     (64)           | 0x00021300 0x00021500 0x00000200
D RKNN: [23:18:44.619] 12  ConvReluAdd   model.4.m.0.cv2.conv.weight      INT8      (64,64,3,3)    | 0x00021500 0x0002a500 0x00009000
D RKNN: [23:18:44.619] 12  ConvReluAdd   model.4.m.0.cv2.conv.bias        INT32     (64)           | 0x0002a500 0x0002a700 0x00000200
D RKNN: [23:18:44.619] 13  ConvRelu      model.4.m.1.cv1.conv.weight      INT8      (64,64,1,1)    | 0x0002a700 0x0002b700 0x00001000
D RKNN: [23:18:44.619] 13  ConvRelu      model.4.m.1.cv1.conv.bias        INT32     (64)           | 0x0002b700 0x0002b900 0x00000200
D RKNN: [23:18:44.619] 14  ConvReluAdd   model.4.m.1.cv2.conv.weight      INT8      (64,64,3,3)    | 0x0002b900 0x00034900 0x00009000
D RKNN: [23:18:44.619] 14  ConvReluAdd   model.4.m.1.cv2.conv.bias        INT32     (64)           | 0x00034900 0x00034b00 0x00000200
D RKNN: [23:18:44.619] 15  ConvRelu      model.4.cv2.conv.weight          INT8      (64,128,1,1)   | 0x00034b00 0x00036b00 0x00002000
D RKNN: [23:18:44.619] 15  ConvRelu      model.4.cv2.conv.bias            INT32     (64)           | 0x00036b00 0x00036d00 0x00000200
D RKNN: [23:18:44.619] 17  ConvRelu      model.4.cv3.conv.weight          INT8      (128,128,1,1)  | 0x00036d00 0x0003ad00 0x00004000
D RKNN: [23:18:44.619] 17  ConvRelu      model.4.cv3.conv.bias            INT32     (128)          | 0x0003ad00 0x0003b100 0x00000400
D RKNN: [23:18:44.619] 18  ConvRelu      model.5.conv.weight              INT8      (256,128,3,3)  | 0x0003b100 0x00083100 0x00048000
D RKNN: [23:18:44.619] 18  ConvRelu      model.5.conv.bias                INT32     (256)          | 0x00083100 0x00083900 0x00000800
D RKNN: [23:18:44.619] 19  ConvRelu      model.6.cv1.conv.weight          INT8      (128,256,1,1)  | 0x00083900 0x0008b900 0x00008000
D RKNN: [23:18:44.619] 19  ConvRelu      model.6.cv1.conv.bias            INT32     (128)          | 0x0008b900 0x0008bd00 0x00000400
D RKNN: [23:18:44.619] 20  ConvRelu      model.6.m.0.cv1.conv.weight      INT8      (128,128,1,1)  | 0x0008bd00 0x0008fd00 0x00004000
D RKNN: [23:18:44.619] 20  ConvRelu      model.6.m.0.cv1.conv.bias        INT32     (128)          | 0x0008fd00 0x00090100 0x00000400
D RKNN: [23:18:44.619] 21  ConvReluAdd   model.6.m.0.cv2.conv.weight      INT8      (128,128,3,3)  | 0x00090100 0x000b4100 0x00024000
D RKNN: [23:18:44.619] 21  ConvReluAdd   model.6.m.0.cv2.conv.bias        INT32     (128)          | 0x000b4100 0x000b4500 0x00000400
D RKNN: [23:18:44.619] 22  ConvRelu      model.6.m.1.cv1.conv.weight      INT8      (128,128,1,1)  | 0x000b4500 0x000b8500 0x00004000
D RKNN: [23:18:44.619] 22  ConvRelu      model.6.m.1.cv1.conv.bias        INT32     (128)          | 0x000b8500 0x000b8900 0x00000400
D RKNN: [23:18:44.619] 23  ConvReluAdd   model.6.m.1.cv2.conv.weight      INT8      (128,128,3,3)  | 0x000b8900 0x000dc900 0x00024000
D RKNN: [23:18:44.619] 23  ConvReluAdd   model.6.m.1.cv2.conv.bias        INT32     (128)          | 0x000dc900 0x000dcd00 0x00000400
D RKNN: [23:18:44.619] 24  ConvRelu      model.6.m.2.cv1.conv.weight      INT8      (128,128,1,1)  | 0x000dcd00 0x000e0d00 0x00004000
D RKNN: [23:18:44.619] 24  ConvRelu      model.6.m.2.cv1.conv.bias        INT32     (128)          | 0x000e0d00 0x000e1100 0x00000400
D RKNN: [23:18:44.619] 25  ConvReluAdd   model.6.m.2.cv2.conv.weight      INT8      (128,128,3,3)  | 0x000e1100 0x00105100 0x00024000
D RKNN: [23:18:44.619] 25  ConvReluAdd   model.6.m.2.cv2.conv.bias        INT32     (128)          | 0x00105100 0x00105500 0x00000400
D RKNN: [23:18:44.619] 26  ConvRelu      model.6.cv2.conv.weight          INT8      (128,256,1,1)  | 0x00105500 0x0010d500 0x00008000
D RKNN: [23:18:44.619] 26  ConvRelu      model.6.cv2.conv.bias            INT32     (128)          | 0x0010d500 0x0010d900 0x00000400
D RKNN: [23:18:44.619] 28  ConvRelu      model.6.cv3.conv.weight          INT8      (256,256,1,1)  | 0x0010d900 0x0011d900 0x00010000
D RKNN: [23:18:44.619] 28  ConvRelu      model.6.cv3.conv.bias            INT32     (256)          | 0x0011d900 0x0011e100 0x00000800
D RKNN: [23:18:44.619] 29  ConvRelu      model.7.conv.weight              INT8      (512,256,3,3)  | 0x0011e100 0x0023e100 0x00120000
D RKNN: [23:18:44.619] 29  ConvRelu      model.7.conv.bias                INT32     (512)          | 0x0023e100 0x0023f100 0x00001000
D RKNN: [23:18:44.619] 30  ConvRelu      model.8.cv1.conv.weight          INT8      (256,512,1,1)  | 0x0023f100 0x0025f100 0x00020000
D RKNN: [23:18:44.619] 30  ConvRelu      model.8.cv1.conv.bias            INT32     (256)          | 0x0025f100 0x0025f900 0x00000800
D RKNN: [23:18:44.619] 31  ConvRelu      model.8.m.0.cv1.conv.weight      INT8      (256,256,1,1)  | 0x0025f900 0x0026f900 0x00010000
D RKNN: [23:18:44.619] 31  ConvRelu      model.8.m.0.cv1.conv.bias        INT32     (256)          | 0x0026f900 0x00270100 0x00000800
D RKNN: [23:18:44.619] 32  ConvReluAdd   model.8.m.0.cv2.conv.weight      INT8      (256,256,3,3)  | 0x00270100 0x00300100 0x00090000
D RKNN: [23:18:44.619] 32  ConvReluAdd   model.8.m.0.cv2.conv.bias        INT32     (256)          | 0x00300100 0x00300900 0x00000800
D RKNN: [23:18:44.619] 33  ConvRelu      model.8.cv2.conv.weight          INT8      (256,512,1,1)  | 0x00300900 0x00320900 0x00020000
D RKNN: [23:18:44.619] 33  ConvRelu      model.8.cv2.conv.bias            INT32     (256)          | 0x00320900 0x00321100 0x00000800
D RKNN: [23:18:44.619] 35  ConvRelu      model.8.cv3.conv.weight          INT8      (512,512,1,1)  | 0x00321100 0x00361100 0x00040000
D RKNN: [23:18:44.619] 35  ConvRelu      model.8.cv3.conv.bias            INT32     (512)          | 0x00361100 0x00362100 0x00001000
D RKNN: [23:18:44.619] 36  ConvRelu      model.9.cv1.conv.weight          INT8      (256,512,1,1)  | 0x00362100 0x00382100 0x00020000
D RKNN: [23:18:44.619] 36  ConvRelu      model.9.cv1.conv.bias            INT32     (256)          | 0x00382100 0x00382900 0x00000800
D RKNN: [23:18:44.619] 41  ConvRelu      model.9.cv2.conv.weight          INT8      (512,1024,1,1) | 0x00382900 0x00402900 0x00080000
D RKNN: [23:18:44.619] 41  ConvRelu      model.9.cv2.conv.bias            INT32     (512)          | 0x00402900 0x00403900 0x00001000
D RKNN: [23:18:44.619] 42  ConvRelu      model.10.conv.weight             INT8      (256,512,1,1)  | 0x00403900 0x00423900 0x00020000
D RKNN: [23:18:44.619] 42  ConvRelu      model.10.conv.bias               INT32     (256)          | 0x00423900 0x00424100 0x00000800
D RKNN: [23:18:44.619] 43  ConvTranspose Resize_84_2deconv_weight         INT8      (256,1,4,4)    | 0x006f7180 0x006f8180 0x00001000
D RKNN: [23:18:44.619] 43  ConvTranspose Resize_84_2deconv_weight_bias_0  INT32     (256)          | 0x006f8980 0x006f9180 0x00000800
D RKNN: [23:18:44.619] 45  ConvRelu      model.13.cv1.conv.weight         INT8      (128,512,1,1)  | 0x00424100 0x00434100 0x00010000
D RKNN: [23:18:44.619] 45  ConvRelu      model.13.cv1.conv.bias           INT32     (128)          | 0x00434100 0x00434500 0x00000400
D RKNN: [23:18:44.619] 46  ConvRelu      model.13.m.0.cv1.conv.weight     INT8      (128,128,1,1)  | 0x00434500 0x00438500 0x00004000
D RKNN: [23:18:44.619] 46  ConvRelu      model.13.m.0.cv1.conv.bias       INT32     (128)          | 0x00438500 0x00438900 0x00000400
D RKNN: [23:18:44.619] 47  ConvRelu      model.13.m.0.cv2.conv.weight     INT8      (128,128,3,3)  | 0x00438900 0x0045c900 0x00024000
D RKNN: [23:18:44.619] 47  ConvRelu      model.13.m.0.cv2.conv.bias       INT32     (128)          | 0x0045c900 0x0045cd00 0x00000400
D RKNN: [23:18:44.619] 48  ConvRelu      model.13.cv2.conv.weight         INT8      (128,512,1,1)  | 0x0045cd00 0x0046cd00 0x00010000
D RKNN: [23:18:44.619] 48  ConvRelu      model.13.cv2.conv.bias           INT32     (128)          | 0x0046cd00 0x0046d100 0x00000400
D RKNN: [23:18:44.619] 50  ConvRelu      model.13.cv3.conv.weight         INT8      (256,256,1,1)  | 0x0046d100 0x0047d100 0x00010000
D RKNN: [23:18:44.619] 50  ConvRelu      model.13.cv3.conv.bias           INT32     (256)          | 0x0047d100 0x0047d900 0x00000800
D RKNN: [23:18:44.619] 51  ConvRelu      model.14.conv.weight             INT8      (128,256,1,1)  | 0x0047d900 0x00485900 0x00008000
D RKNN: [23:18:44.619] 51  ConvRelu      model.14.conv.bias               INT32     (128)          | 0x00485900 0x00485d00 0x00000400
D RKNN: [23:18:44.619] 52  ConvTranspose Resize_100_2deconv_weight        INT8      (128,1,4,4)    | 0x006f8180 0x006f8980 0x00000800
D RKNN: [23:18:44.619] 52  ConvTranspose Resize_100_2deconv_weight_bias_0 INT32     (128)          | 0x006f9180*0x006f9580 0x00000400
D RKNN: [23:18:44.619] 54  ConvRelu      model.17.cv1.conv.weight         INT8      (64,256,1,1)   | 0x00485d00 0x00489d00 0x00004000
D RKNN: [23:18:44.619] 54  ConvRelu      model.17.cv1.conv.bias           INT32     (64)           | 0x00489d00 0x00489f00 0x00000200
D RKNN: [23:18:44.619] 55  ConvRelu      model.17.m.0.cv1.conv.weight     INT8      (64,64,1,1)    | 0x00489f00 0x0048af00 0x00001000
D RKNN: [23:18:44.619] 55  ConvRelu      model.17.m.0.cv1.conv.bias       INT32     (64)           | 0x0048af00 0x0048b100 0x00000200
D RKNN: [23:18:44.619] 56  ConvRelu      model.17.m.0.cv2.conv.weight     INT8      (64,64,3,3)    | 0x0048b100 0x00494100 0x00009000
D RKNN: [23:18:44.619] 56  ConvRelu      model.17.m.0.cv2.conv.bias       INT32     (64)           | 0x00494100 0x00494300 0x00000200
D RKNN: [23:18:44.619] 57  ConvRelu      model.17.cv2.conv.weight         INT8      (64,256,1,1)   | 0x00494300 0x00498300 0x00004000
D RKNN: [23:18:44.619] 57  ConvRelu      model.17.cv2.conv.bias           INT32     (64)           | 0x00498300 0x00498500 0x00000200
D RKNN: [23:18:44.619] 59  ConvRelu      model.17.cv3.conv.weight         INT8      (128,128,1,1)  | 0x00498500 0x0049c500 0x00004000
D RKNN: [23:18:44.619] 59  ConvRelu      model.17.cv3.conv.bias           INT32     (128)          | 0x0049c500 0x0049c900 0x00000400
D RKNN: [23:18:44.619] 60  Conv          model.24.m.0.weight              INT8      (255,128,1,1)  | 0x006bdd00 0x006c5c80 0x00007f80
D RKNN: [23:18:44.619] 60  Conv          model.24.m.0.bias                INT32     (255)          | 0x006c5c80 0x006c6480 0x00000800
D RKNN: [23:18:44.619] 62  ConvRelu      model.18.conv.weight             INT8      (128,128,3,3)  | 0x0049c900 0x004c0900 0x00024000
D RKNN: [23:18:44.619] 62  ConvRelu      model.18.conv.bias               INT32     (128)          | 0x004c0900 0x004c0d00 0x00000400
D RKNN: [23:18:44.619] 64  ConvRelu      model.20.cv1.conv.weight         INT8      (128,256,1,1)  | 0x004c0d00 0x004c8d00 0x00008000
D RKNN: [23:18:44.619] 64  ConvRelu      model.20.cv1.conv.bias           INT32     (128)          | 0x004c8d00 0x004c9100 0x00000400
D RKNN: [23:18:44.619] 65  ConvRelu      model.20.m.0.cv1.conv.weight     INT8      (128,128,1,1)  | 0x004c9100 0x004cd100 0x00004000
D RKNN: [23:18:44.619] 65  ConvRelu      model.20.m.0.cv1.conv.bias       INT32     (128)          | 0x004cd100 0x004cd500 0x00000400
D RKNN: [23:18:44.619] 66  ConvRelu      model.20.m.0.cv2.conv.weight     INT8      (128,128,3,3)  | 0x004cd500 0x004f1500 0x00024000
D RKNN: [23:18:44.619] 66  ConvRelu      model.20.m.0.cv2.conv.bias       INT32     (128)          | 0x004f1500 0x004f1900 0x00000400
D RKNN: [23:18:44.619] 67  ConvRelu      model.20.cv2.conv.weight         INT8      (128,256,1,1)  | 0x004f1900 0x004f9900 0x00008000
D RKNN: [23:18:44.619] 67  ConvRelu      model.20.cv2.conv.bias           INT32     (128)          | 0x004f9900 0x004f9d00 0x00000400
D RKNN: [23:18:44.619] 69  ConvRelu      model.20.cv3.conv.weight         INT8      (256,256,1,1)  | 0x004f9d00 0x00509d00 0x00010000
D RKNN: [23:18:44.619] 69  ConvRelu      model.20.cv3.conv.bias           INT32     (256)          | 0x00509d00 0x0050a500 0x00000800
D RKNN: [23:18:44.619] 70  Conv          model.24.m.1.weight              INT8      (255,256,1,1)  | 0x006c6480 0x006d6380 0x0000ff00
D RKNN: [23:18:44.619] 70  Conv          model.24.m.1.bias                INT32     (255)          | 0x006d6380 0x006d6b80 0x00000800
D RKNN: [23:18:44.619] 72  ConvRelu      model.21.conv.weight             INT8      (256,256,3,3)  | 0x0050a500 0x0059a500 0x00090000
D RKNN: [23:18:44.619] 72  ConvRelu      model.21.conv.bias               INT32     (256)          | 0x0059a500 0x0059ad00 0x00000800
D RKNN: [23:18:44.619] 74  ConvRelu      model.23.cv1.conv.weight         INT8      (256,512,1,1)  | 0x0059ad00 0x005bad00 0x00020000
D RKNN: [23:18:44.619] 74  ConvRelu      model.23.cv1.conv.bias           INT32     (256)          | 0x005bad00 0x005bb500 0x00000800
D RKNN: [23:18:44.619] 75  ConvRelu      model.23.m.0.cv1.conv.weight     INT8      (256,256,1,1)  | 0x005bb500 0x005cb500 0x00010000
D RKNN: [23:18:44.619] 75  ConvRelu      model.23.m.0.cv1.conv.bias       INT32     (256)          | 0x005cb500 0x005cbd00 0x00000800
D RKNN: [23:18:44.619] 76  ConvRelu      model.23.m.0.cv2.conv.weight     INT8      (256,256,3,3)  | 0x005cbd00 0x0065bd00 0x00090000
D RKNN: [23:18:44.619] 76  ConvRelu      model.23.m.0.cv2.conv.bias       INT32     (256)          | 0x0065bd00 0x0065c500 0x00000800
D RKNN: [23:18:44.619] 77  ConvRelu      model.23.cv2.conv.weight         INT8      (256,512,1,1)  | 0x0065c500 0x0067c500 0x00020000
D RKNN: [23:18:44.619] 77  ConvRelu      model.23.cv2.conv.bias           INT32     (256)          | 0x0067c500 0x0067cd00 0x00000800
D RKNN: [23:18:44.619] 79  ConvRelu      model.23.cv3.conv.weight         INT8      (512,512,1,1)  | 0x0067cd00 0x006bcd00 0x00040000
D RKNN: [23:18:44.619] 79  ConvRelu      model.23.cv3.conv.bias           INT32     (512)          | 0x006bcd00 0x006bdd00 0x00001000
D RKNN: [23:18:44.619] 80  Conv          model.24.m.2.weight              INT8      (255,512,1,1)  | 0x006d6b80 0x006f6980 0x0001fe00
D RKNN: [23:18:44.619] 80  Conv          model.24.m.2.bias                INT32     (255)          | 0x006f6980 0x006f7180 0x00000800
D RKNN: [23:18:44.619] ----------------------------------------------------------------------------+---------------------------------
D RKNN: [23:18:44.620] ----------------------------------------
D RKNN: [23:18:44.620] Total Weight Memory Size: 7312768
D RKNN: [23:18:44.620] Total Internal Memory Size: 6144000
D RKNN: [23:18:44.620] Predict Internal Memory RW Amount: 82852632
D RKNN: [23:18:44.620] Predict Weight Memory RW Amount: 7312768
D RKNN: [23:18:44.620] ----------------------------------------
D RKNN: [23:18:44.620] <<<<<<<< end: N4rknn21RKNNMemStatisticsPassE
I rknn buiding done.
done
--> Export rknn model
done
--> Init runtime environment
W init_runtime: Target is None, use simulator!
done
--> Running model
W inference: The 'data_format' has not been set and defaults is nhwc!
Analysing : 100%|███████████████████████████████████████████████| 146/146 [00:00<00:00, 6085.53it/s]
Preparing : 100%|████████████████████████████████████████████████| 146/146 [00:01<00:00, 111.14it/s]
W inference: The dims of input(ndarray) shape (640, 640, 3) is wrong, expect dims is 4! Try expand dims to (1, 640, 640, 3)!
done
class: person, score: 0.8838784694671631
box coordinate left,top,right,down: [209.6862335205078, 243.11955797672272, 285.13685607910156, 507.7035621404648]
class: person, score: 0.8669421076774597
box coordinate left,top,right,down: [477.6677174568176, 241.00597953796387, 561.1506419181824, 523.3208637237549]
class: person, score: 0.826057493686676
box coordinate left,top,right,down: [110.24830067157745, 235.76190769672394, 231.76915538311005, 536.1012514829636]
class: person, score: 0.32633307576179504
box coordinate left,top,right,down: [80.75779604911804, 354.98211681842804, 121.49669003486633, 516.531555056572]
class: bus , score: 0.6890695095062256
box coordinate left,top,right,down: [91.16828817129135, 134.78936767578125, 556.8909769654274, 460.78936767578125]


在这里插入图片描述
构建成功!!!

验证,不报错则证明安装环境成功!!!

(rknnpy38) ubuntu@ubuntu:~/Downloads/rknn-toolkit2-master/examples/onnx/yolov5$ python
Python 3.8.16 (default, Mar  2 2023, 03:21:46) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from rknn.api import RKNN

2 模型转换

将训练好的yolov7.pt转换为yolov7.onnx。
将yolov7.onnx转换为yolov7.rknn。
首先去官网下载源码和yolov7.pt文件。
源码地址:https://github.com/WongKinYiu/yolov7.git
模型地址:https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt
在models/yolo.py中将Detect类中的前向传播过程由:

    def forward(self, x):
        # x = x.copy()  # for profiling
        z = []  # inference output
        self.training |= self.export
        for i in range(self.nl):
            x[i] = self.m[i](x[i])  # conv
            bs, _, ny, nx = x[i].shape  # x(bs,255,20,20) to x(bs,3,20,20,85)
            x[i] = x[i].view(bs, self.na, self.no, ny, nx).permute(0, 1, 3, 4, 2).contiguous()

            if not self.training:  # inference
                if self.grid[i].shape[2:4] != x[i].shape[2:4]:
                    self.grid[i] = self._make_grid(nx, ny).to(x[i].device)
                y = x[i].sigmoid()
                if not torch.onnx.is_in_onnx_export():
                    y[..., 0:2] = (y[..., 0:2] * 2. - 0.5 + self.grid[i]) * self.stride[i]  # xy
                    y[..., 2:4] = (y[..., 2:4] * 2) ** 2 * self.anchor_grid[i]  # wh
                else:
                    xy, wh, conf = y.split((2, 2, self.nc + 1), 4)  # y.tensor_split((2, 4, 5), 4)  # torch 1.8.0
                    xy = xy * (2. * self.stride[i]) + (self.stride[i] * (self.grid[i] - 0.5))  # new xy
                    wh = wh ** 2 * (4 * self.anchor_grid[i].data)  # new wh
                    y = torch.cat((xy, wh, conf), 4)
                z.append(y.view(bs, -1, self.no))

        if self.training:
            out = x
        elif self.end2end:
            out = torch.cat(z, 1)
        elif self.include_nms:
            z = self.convert(z)
            out = (z, )
        elif self.concat:
            out = torch.cat(z, 1)
        else:
            out = (torch.cat(z, 1), x)

        return out

改成:

   def forward(self, x):
        z = []  # inference output
        for i in range(self.nl):
            x[i] = self.m[i](x[i])

        return x

注:这一步一定要改,否则在onnx转rknn时会报错。
修改后将yolov7.pt移动至export.py同一文件夹下,运行export.py便可以得到yolov7.onnx。

在rknn-toolkit2工程文件夹中浏览至./examples/onnx/yolov5,将我们转换得到的yolov7.onnx复制到该文件夹下,修改该文件夹下的test.py中的内容为自己模型的名字,要修改的地方如下:
在这里插入图片描述
在这里插入图片描述
此处我们只需要修改前两项和搭载平台的名字即可。
最后运行test.py,即可得到rknn模型。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/613974.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

趣未来科技董事长黄婵娇:专注创新研发,把公司当做科研机构来运作!

身为研发型董事长&#xff0c;黄婵娇女士谈及“技术”&#xff0c;眼中总是透着由衷的自豪。她的办公室摆满了各类技术文件以及图纸&#xff0c;以身作则将技术研发基因带入公司核心运维&#xff0c;强势带动深圳市趣未来&#xff08;B2GO&#xff09;科技有限公司一步步成长为…

电赛备赛日记(一):K210与STM32串口通信

拖更了n久的备赛日记终于来啦&#xff0c;最近实现了关于K210图像识别并将所需数据&#xff08;即目标类别&#xff0c;目标在图像中的加权坐标&#xff09;其中&#xff0c;加权坐标指K210识别到的目标并框出的框的宽和高与框左上顶点的坐标加权&#xff0c;希望以此来判断目标…

海云捷讯杯 赛后总结 目标检测——缺陷检测(模型训练部分)

在这次比赛中&#xff0c;本人在队伍中主要负责模型训练部分&#xff0c;所以本文主要讲述如何使用PaddleDetection代码自定义数据集进行目标检测&#xff0c;欢迎大家纠错讨论哦&#xff0c;不胜荣幸~ 参考项目&#xff1a; SSDquexianjiance - 飞桨AI Studio (baidu.com) 感…

云上高校导航

2023042719 - 云上高校导航 中国大学生计算机设计大赛 广西赛区 软件应用与开发 - 移动应用开发&#xff08;非游戏类&#xff09; 三等奖 “云上高校导航”是一套基于小程序云开发的校园导航类系统开发方案。 该开发方案可供开发者进行二次开发&#xff0c;用于解决师生和访客…

MySQL数据库理论基础

数据库-理论基础 1.什么是数据库2.数据库管理系统(DBMS)3.数据库与文件系统的区别4.数据库的发展史5. 常见数据库5.1 关系型数据库5.2 非关系型数据库 6.MySQL简介7. MySQL的特性8.MySQL获取9.MySQL在企业中应用10.MySQL体系结构 1.什么是数据库 数据&#xff1a; 描述事物的符…

Linux 高级篇-定制自己的Linux 系统

Linux 高级篇-定制自己的Linux 系统 基本介绍 通过裁剪现有Linux 系统(CentOS7.6)&#xff0c;创建属于自己的min Linux 小系统&#xff0c;可以加深我们对linux 的理解。利用centos7.6&#xff0c;搭建一个小小linux 系统, 很有趣。 基本原理 启动流程介绍&#xff1a; 制…

LeetCode25. K 个一组翻转链表

给你链表的头节点 head &#xff0c;每 k 个节点一组进行翻转&#xff0c;请你返回修改后的链表。 k 是一个正整数&#xff0c;它的值小于或等于链表的长度。如果节点总数不是 k 的整数倍&#xff0c;那么请将最后剩余的节点保持原有顺序。 你不能只是单纯的改变节点内部的值…

操作系统之IO管理

目录 IO设备的概念和分类 IO控制器 IO控制方式 IO软件层次结构 IO应用程序接口和驱动程序接口 IO核心子系统 假脱机技术 IO设备的分配和回收 缓冲区管理 磁盘的结构 磁盘调度算法 磁盘的管理 固态硬盘 本文内容摘自&#xff1a;5.1_1_I-O设备的概念和分类_哔哩哔哩…

cookie 和 session 的恩恩怨怨

目录 cookie 1. Cookie 从哪里来? 2. Cookie 到哪里去? 3. Cookie 有啥用? Session Session 中的常用方法 模拟实现一个登录页面: session 和 cookie 的最官方的恩恩怨怨 cookie Cookie 是浏览器在本地存储数据的一种机制 1. Cookie 从哪里来? Cookie 从服务器…

chatgpt赋能python:Python如何将两张图片横向拼在一起

Python如何将两张图片横向拼在一起 在网页设计中&#xff0c;有时候需要将两张图片横向拼在一起来达到更好的展示效果。本文将介绍如何使用Python实现这一功能。 前置知识 在使用Python进行图像处理之前&#xff0c;先了解以下几个库&#xff1a; Pillow&#xff1a;Python…

chatgpt赋能python:Python如何取非

Python如何取非 Python是一种强大的编程语言&#xff0c;可以用于许多不同的任务&#xff0c;包括搜索引擎优化&#xff08;SEO&#xff09;。在这篇文章中&#xff0c;我们将重点介绍Python如何取非&#xff0c;这对于SEO优化非常重要。 什么是取非&#xff1f; 在SEO中&am…

chatgpt赋能python:Python如何手动安装包:技术向SEO文章

Python如何手动安装包&#xff1a;技术向SEO文章 虽然大多数Python用户都习惯使用pip来安装和管理包&#xff0c;但手动安装包是必要的技能之一。这篇文章将介绍如何使用Python的标准方法手动安装包&#xff0c;并提供实际的指导。 为什么要手动安装包&#xff1f; 有时候&a…

达梦数据库读写分离集群搭建

目录 说明... 3 前期准备... 4 开始搭建读写分离... 5 一、主库200. 5 1、卸载原实例... 5 2、创建新的实例... 6 3、配置主库200. 6 4、启动主库... 8 5、设置OGUID.. 8 二、配置2台备库... 9 1、创建新的实例... 9 2、备份恢复&#xff08;初始化实例后应该先备份…

VS2012编译VTK7.1.1库,使用VTK加载显示STL图像

文章目录 cmake配置项目编译VTK库代码测试报错:no override found for vtkpolydata下载VTK库下载地址,下载VTK源码 https://vtk.org/download/ 需要工具 1.VS2012 2.CMAKE 官网 https://cmake.org/ cmake配置项目 下载后的vtk7.1.1库解压 安装好cmake,打开cmake-gui,在whe…

chatgpt赋能python:Python循环语句详解:如何循环执行一个语句

Python循环语句详解&#xff1a;如何循环执行一个语句 Python是一种简单易学、优雅高效的编程语言&#xff0c;在很多领域都有广泛应用。其中&#xff0c;循环语句特别重要&#xff0c;可以让我们轻松实现重复执行某个语句的功能。本文将介绍Python的循环语句及其应用场景&…

01:快速入门爬虫

1.引导 1.Robots协议 Robots协议&#xff08;爬虫协议&#xff09;的全称是“网络爬虫排除标准”&#xff08;Robots Exclusion Protocol&#xff09;&#xff0c;网站通过Robots协议告诉搜索引擎哪些页面可以抓取&#xff0c;哪些页面不能抓取。该协议是国际互联网界通行的道…

Pytorch1.12.1+cu113安装记录

因为torch1.7.0对于SiLU算子导出不支持,需要1.7.1才支持.于是索性准备更新一下自己的算法版本库,查询到CUDA11.3支持的最高Pytorch版本为1.12.1,于是统一做一下更新.这里采用离线下载的方式,因为在线下载实在是太蛋疼了 1. Pytorch离线包下载 这是官方提供的版本,我这里不直接…

Python-web开发学习笔记(4):CSS基础

&#x1f680; Python-web开发学习笔记系列往期文章&#xff1a; &#x1f343; Python-web开发学习笔记&#xff08;1&#xff09;--- HTML基础 &#x1f343; Python-web开发学习笔记&#xff08;2&#xff09;--- HTML基础 &#x1f343; Python-web开发学习笔记&#xff08…

面试常考算法(1):反转链表、局部反转链表(包含误区分析)

BM1 反转链表 给定一个单链表的头结点pHead(该头节点是有值的&#xff0c;&#xff0c;$ 长度为n&#xff0c;反转该链表后&#xff0c;返回新链表的表头。   数据范围: 0 ≤ n ≤ 1000 0 \leq n \leq 1000 0≤n≤1000   要求: 空间复杂度 O ( 1 ) O(1) O(1) &#xff0c…

QT QHorizontalSpacer弹簧控件

本文详细的介绍了QHorizontalSpacer控件的各种操作&#xff0c;例如&#xff1a;新建界面、控件布局、隐藏控件、设置宽高、添加布局、其它参数、.h源文件、cpp源文件、其它文章等等操作。 实际开发中&#xff0c;一个界面上可能包含十几个控件&#xff0c;手动调整它们的位置既…