ESDR 사용시 --chop 옵션을 사용할 수 없는 문제 해결
- https://github.com/sanghyun-son/EDSR-PyTorch/issues/184#issuecomment-502650995
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -132,7 +132,8 @@ class Model(nn.Module): | ... | @@ -132,7 +132,8 @@ class Model(nn.Module): |
132 | y_chop.extend(_y.chunk(n_GPUs, dim=0)) | 132 | y_chop.extend(_y.chunk(n_GPUs, dim=0)) |
133 | else: | 133 | else: |
134 | for p in zip(*x_chops): | 134 | for p in zip(*x_chops): |
135 | - y = self.forward_chop(*p, shave=shave, min_size=min_size) | 135 | + p1 = [p[0].unsqueeze(0)] |
136 | + y = self.forward_chop(*p1, shave=shave, min_size=min_size) | ||
136 | if not isinstance(y, list): y = [y] | 137 | if not isinstance(y, list): y = [y] |
137 | if not y_chops: | 138 | if not y_chops: |
138 | y_chops = [[_y] for _y in y] | 139 | y_chops = [[_y] for _y in y] | ... | ... |
-
Please register or login to post a comment