未验证 提交 1acb1852 编写于 作者: U ucsk 提交者: GitHub

[Fix] Update operators.py (#5357)

Fixed a possible error on line 2021: "TypeError: 'numpy.float64' object cannot be interpreted as an integer".
上级 c643eeab
......@@ -2032,8 +2032,8 @@ class Pad(BaseOperator):
im_h < h and im_w < w
), '(h, w) of target size should be greater than (im_h, im_w)'
else:
h = np.ceil(im_h / self.size_divisor) * self.size_divisor
w = np.ceil(im_w / self.size_divisor) * self.size_divisor
h = int(np.ceil(im_h / self.size_divisor) * self.size_divisor)
w = int(np.ceil(im_w / self.size_divisor) * self.size_divisor)
if h == im_h and w == im_w:
return sample
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册