Skip to content

Commit affc5ae

Browse files
[Fix] fix ssd ncnn ut (#692)
* fix ssd ncnn ut * fix yapf
1 parent 17a7d60 commit affc5ae

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

tests/test_codebase/test_mmdet/test_mmdet_models.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,18 +1409,19 @@ def test_ssd_head_get_bboxes__ncnn(is_dynamic: bool):
14091409
'img_shape': (s, s, 3)
14101410
}]
14111411
output_names = ['output']
1412-
input_names = ['input']
1412+
input_names = []
1413+
for i in range(6):
1414+
input_names.append('cls_scores_' + str(i))
1415+
input_names.append('bbox_preds_' + str(i))
14131416
dynamic_axes = None
14141417
if is_dynamic:
14151418
dynamic_axes = {
1416-
input_names[0]: {
1417-
2: 'height',
1418-
3: 'width'
1419-
},
14201419
output_names[0]: {
14211420
1: 'num_dets',
14221421
}
14231422
}
1423+
for input_name in input_names:
1424+
dynamic_axes[input_name] = {2: 'height', 3: 'width'}
14241425
deploy_cfg = mmcv.Config(
14251426
dict(
14261427
backend_config=dict(type=Backend.NCNN.value),

0 commit comments

Comments
 (0)