未验证 提交 05e4883b 编写于 作者: G Guanghua Yu 提交者: GitHub

fix paddle.shape in export model (#2091)

上级 2bdb9a86
...@@ -536,7 +536,7 @@ class RCNNBox(object): ...@@ -536,7 +536,7 @@ class RCNNBox(object):
# TODO: Updata box_clip # TODO: Updata box_clip
origin_h = paddle.unsqueeze(origin_shape[:, 0] - 1, axis=1) origin_h = paddle.unsqueeze(origin_shape[:, 0] - 1, axis=1)
origin_w = paddle.unsqueeze(origin_shape[:, 1] - 1, axis=1) origin_w = paddle.unsqueeze(origin_shape[:, 1] - 1, axis=1)
zeros = paddle.zeros(origin_h.shape, 'float32') zeros = paddle.zeros(paddle.shape(origin_h), 'float32')
x1 = paddle.maximum(paddle.minimum(bbox[:, :, 0], origin_w), zeros) x1 = paddle.maximum(paddle.minimum(bbox[:, :, 0], origin_w), zeros)
y1 = paddle.maximum(paddle.minimum(bbox[:, :, 1], origin_h), zeros) y1 = paddle.maximum(paddle.minimum(bbox[:, :, 1], origin_h), zeros)
x2 = paddle.maximum(paddle.minimum(bbox[:, :, 2], origin_w), zeros) x2 = paddle.maximum(paddle.minimum(bbox[:, :, 2], origin_w), zeros)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册