diff --git a/ppdet/data/transform/operators.py b/ppdet/data/transform/operators.py index 0c56d0c5d62e94df47484d0285174e67a6c509c9..df852584a587cf5aba873ffd1ea41d64360417c6 100644 --- a/ppdet/data/transform/operators.py +++ b/ppdet/data/transform/operators.py @@ -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