Skip to content

Commit 730b4f7

Browse files
committed
Fix for comments
1 parent aafe907 commit 730b4f7

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

python/tvm/relay/op/vision/_vision.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def _regular_nms_shape_func(boxes_shape, scores_shape, attrs):
142142
out_scores_shape[0] = boxes_shape[0]
143143
out_scores_shape[1] = int64(attrs.max_detections)
144144

145-
out_num_detections_shape[0] = int64(1)
145+
out_num_detections_shape[0] = boxes_shape[0]
146146

147147
return out_boxes_shape, out_classes_shape, out_scores_shape, out_num_detections_shape
148148

python/tvm/topi/cuda/ssd/multibox.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,7 @@ def transform_loc(loc, loc_base_idx, anchor, anchor_base_idx, clip, vx, vy, vw,
363363
with ib.if_scope(tvm.tir.any(keep_background == 1, cls_id[tid] > 0)):
364364
with ib.if_scope(j == 0):
365365
out_base_idx = i * num_anchors * 6
366-
out_loc[out_base_idx] = (
367-
cls_id[tid] - 0.0 if keep_background == 1 else cls_id[tid] - 1.0
368-
)
366+
out_loc[out_base_idx] = cls_id[tid] if keep_background == 1 else cls_id[tid] - 1.0
369367
out_loc[out_base_idx + 1] = score[tid]
370368
(
371369
out_loc[out_base_idx + 2],
@@ -385,9 +383,7 @@ def transform_loc(loc, loc_base_idx, anchor, anchor_base_idx, clip, vx, vy, vw,
385383
)
386384
with ib.else_scope():
387385
out_base_idx = i * num_anchors * 6 + temp_valid_count[tid - 1] * 6
388-
out_loc[out_base_idx] = (
389-
cls_id[tid] - 0.0 if keep_background == 1 else cls_id[tid] - 1.0
390-
)
386+
out_loc[out_base_idx] = cls_id[tid] if keep_background == 1 else cls_id[tid] - 1.0
391387
out_loc[out_base_idx + 1] = score[tid]
392388
(
393389
out_loc[out_base_idx + 2],

0 commit comments

Comments
 (0)