Created by: cjt222
add deformable roi pooling op, this is merged to develop #17827. Now cherry pick to v1.5
1、性能测试
测试环境:系统为ubuntu16.04, 显卡为v100 (1) Deformable PSROIPooling 和PSROI Pool对比 输入: 1)input为随机生成的维度为[5, 128, 64, 64]的数据 2)rois为随机生成的16个框,维度为[16, 4],LOD分布为[4,3,2,2,5] 3)trans 为固定维度的[16, 2, 8, 8],值全部为0.5 4)参数设置: > no_trans=0, spatial_scale=1.0, output_channels=2, group_size=[1,1], pooled_height=8, pooled_width=8, part_size=[4, 4], sample_per_part=4, trans_std=0.1
Event | Call | Total | CPU Time (Ratio) | GPU Time (Ratio) | Min | Max | Ave |
---|---|---|---|---|---|---|---|
psroi_pool | 100 | 7.36984 | 6.778908 (0.919818) | 0.590927 (0.080182) | 0.067989 | 0.126735 | 0.0736984 |
psroi_pool_grad | 100 | 9.12887 | 7.187817 (0.787372) | 1.941052 (0.212628) | 0.084644 | 0.104966 | 0.0912887 |
deformable_psroi_pooling | 100 | 10.3871 | 8.548373 (0.822981) | 1.838717 (0.177019) | 0.09416 | 0.131347 | 0.103871 |
deformable_psroi_pooling_grad | 100 | 13.5551 | 8.890796 (0.655902) | 4.664282 (0.344098) | 0.126387 | 0.159987 | 0.135551 |
(2) Deformable PSROIPooling和PSROI Pool对比 输入: 1)input为随机生成的维度为[5, 128, 64, 64]的数据 2)rois为随机生成的16个框,维度为[16, 4],LOD分布为[4,3,2,2,5] 3)trans 为固定维度的[16, 2, 8, 8],值全部为0.5 4)参数设置: >no_trans=1, spatial_scale=1.0, output_channels=128, group_size=[1,1], pooled_height=8, pooled_width=8, part_size=[4, 4], sample_per_part=4, trans_std=0.1
Event | Call | Total | CPU Time (Ratio) | GPU Time (Ratio) | Min | Max | Ave |
---|---|---|---|---|---|---|---|
roi_pool | 100 | 9.0469 | 7.791581 (0.861243) | 1.255322 (0.138757) | 0.07903 | 0.151427 | 0.090469 |
roi_pool_grad | 100 | 10.018 | 7.788079 (0.777406) | 2.229958 (0.222594) | 0.086172 | 0.177273 | 0.10018 |
deformable_psroi_pooling | 100 | 11.9029 | 8.883906 (0.746367) | 3.018958 (0.25253633) | 0.105524 | 0.148849 | 0.119029 |
deformable_psroi_pooling_grad | 100 | 21.2068 | 9.212682 (0.434421) | 11.994113 (0.565579) | 0.198663 | 0.268479 | 0.212068 |