diff --git a/ppdet/modeling/bbox_utils.py b/ppdet/modeling/bbox_utils.py index 0dd54b376eec2d17b5205cb34fb81ccb533498ff..e2a42449d89074a377b5e21c8048b3c3d4fba080 100644 --- a/ppdet/modeling/bbox_utils.py +++ b/ppdet/modeling/bbox_utils.py @@ -343,11 +343,8 @@ def xywh2xyxy(box): def make_grid(h, w, dtype): - yv, xv = paddle.meshgrid( - [paddle.arange( - h, dtype=dtype), paddle.arange( - w, dtype=dtype)]) - return paddle.stack((xv, yv), 2) + yv, xv = paddle.meshgrid([paddle.arange(h), paddle.arange(w)]) + return paddle.stack((xv, yv), 2).cast(dtype=dtype) def decode_yolo(box, anchor, downsample_ratio):