Skip to content

Commit a3efba1

Browse files
authored
Merge pull request #14085 from jerrywgz/fix_generate_proposals_op
[1.1] fix erase end in generate proposals op
2 parents b9ae1c4 + de2f965 commit a3efba1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/fluid/operators/detection/generate_proposals_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static inline Tensor NMS(const platform::DeviceContext &ctx, Tensor *bbox,
284284
selected_indices.push_back(idx);
285285
++selected_num;
286286
}
287-
sorted_indices.erase(sorted_indices.end());
287+
sorted_indices.erase(sorted_indices.end() - 1);
288288
if (flag && eta < 1 && adaptive_threshold > 0.5) {
289289
adaptive_threshold *= eta;
290290
}

0 commit comments

Comments
 (0)