Skip to content

Commit 9111122

Browse files
authored
fix register_buffer (PaddlePaddle#5398)
1 parent afb3b7a commit 9111122

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ppdet/modeling/bbox_utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,9 @@ def batch_distance2bbox(points, distance, max_shapes=None):
763763
Tensor: Decoded bboxes, "x1y1x2y2" format.
764764
"""
765765
lt, rb = paddle.split(distance, 2, -1)
766-
x1y1 = points - lt
767-
x2y2 = points + rb
766+
# while tensor add parameters, parameters should be better placed on the second place
767+
x1y1 = -lt + points
768+
x2y2 = rb + points
768769
out_bbox = paddle.concat([x1y1, x2y2], -1)
769770
if max_shapes is not None:
770771
max_shapes = max_shapes.flip(-1).tile([1, 2])

0 commit comments

Comments
 (0)