Skip to content

Commit

Permalink
fix a bug in inference, thanks to @JustQJ
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhihao6 authored Feb 18, 2023
1 parent d07f646 commit ff53d8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def _mosaic(self, x):
h, w = x.shape[2:]
_x = torch.zeros(x.shape[0], 4, h // 2, w // 2, device=x.device)
_x[:, 0] = x[:, 0, 0::2, 0::2]
_x[:, 1] = x[:, 0, 1::2, 0::2]
_x[:, 2] = x[:, 0, 0::2, 1::2]
_x[:, 1] = x[:, 0, 0::2, 1::2]
_x[:, 2] = x[:, 0, 1::2, 0::2]
_x[:, 3] = x[:, 0, 1::2, 1::2]
return _x

Expand Down

0 comments on commit ff53d8c

Please sign in to comment.