Skip to content

Commit

Permalink
Fix minor
Browse files Browse the repository at this point in the history
  • Loading branch information
yhna940 committed Feb 22, 2023
1 parent d6fcddc commit 3b915d4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mmedit/models/common/downsample.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch


def pixel_unshuffle(x, scale):
"""Down-sample by pixel unshuffle.
Expand All @@ -20,7 +17,6 @@ def pixel_unshuffle(x, scale):
f'with shape: {x.shape}')
h = h // scale
w = w // scale
size = torch.Size([b, c, h, scale, w, scale])
x = x.view(size)
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)

0 comments on commit 3b915d4

Please sign in to comment.