diff --git a/mmedit/models/common/downsample.py b/mmedit/models/common/downsample.py index 7d51a5b554..4dcb601475 100644 --- a/mmedit/models/common/downsample.py +++ b/mmedit/models/common/downsample.py @@ -15,8 +15,8 @@ def pixel_unshuffle(x, scale): raise AssertionError( f'Invalid scale ({scale}) of pixel unshuffle for tensor ' f'with shape: {x.shape}') - h = int(h / scale) - w = int(w / scale) + h = h // scale + w = w // scale x = x.view(b, c, h, scale, w, scale) x = x.permute(0, 1, 3, 5, 2, 4) return x.reshape(b, -1, h, w)