Merge pull request #14560 from velconia/fix_nms_op_ut_in_py36

Fix multiclass_nms_op unit test fail in python3.6
local_add_cudnn_lstm
Qiyang Min 6 years ago committed by GitHub
commit 9dad45c545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -145,10 +145,15 @@ def batched_multiclass_nms(boxes, scores, background, score_threshold,
lod.append(nmsed_num)
if nmsed_num == 0: continue
tmp_det_out = []
for c, indices in nmsed_outs.items():
for idx in indices:
xmin, ymin, xmax, ymax = boxes[n][idx][:]
det_outs.append([c, scores[n][c][idx], xmin, ymin, xmax, ymax])
tmp_det_out.append(
[c, scores[n][c][idx], xmin, ymin, xmax, ymax])
sorted_det_out = sorted(
tmp_det_out, key=lambda tup: tup[0], reverse=False)
det_outs.extend(sorted_det_out)
return det_outs, lod

Loading…
Cancel
Save