未验证 提交 e274ee57 编写于 作者: A Aganlengzi 提交者: GitHub

fix CE arange not support float16 (#7529)

上级 3d6a027c
...@@ -343,11 +343,8 @@ def xywh2xyxy(box): ...@@ -343,11 +343,8 @@ def xywh2xyxy(box):
def make_grid(h, w, dtype): def make_grid(h, w, dtype):
yv, xv = paddle.meshgrid( yv, xv = paddle.meshgrid([paddle.arange(h), paddle.arange(w)])
[paddle.arange( return paddle.stack((xv, yv), 2).cast(dtype=dtype)
h, dtype=dtype), paddle.arange(
w, dtype=dtype)])
return paddle.stack((xv, yv), 2)
def decode_yolo(box, anchor, downsample_ratio): def decode_yolo(box, anchor, downsample_ratio):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册