sanghyun-son / EDSR-PyTorch

PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)
MIT License
2.44k stars 673 forks source link

IndentationError: unindent does not match any outer indentation level #336

Open rezraz1 opened 2 years ago

rezraz1 commented 2 years ago

Hello. I want to give some PNG images as input to EDSR model, at first I was faced with the error below: RuntimeError: Given groups=1, weight of size [3, 3, 1, 1], expected input[1, 4, 268, 300] to have 3 channels, but got 4 channels instead. and it was solved with the help of guide lr = lr[:, :3, :, :] after that I faced another error as below: RuntimeError: The size of tensor a (1070) must match the size of tensor b (698) at non-singleton dimension 3. and applied guide [issuecomment](Bug in testing Set5 X3 with args.chop=True · Issue #223 · sanghyun-son/EDSR-PyTorch · GitHub).

I used this advice and replaced the code that put in this page with def forward_chop in the EDSR-PyTorch-master/src/model/__init__.py file. But I encountered a new error as below and i don't know how to fix it: IndentationError: unindent does not match any outer indentation level I would be very grateful if you could please tell me how I can solve this problem or guide me if I did something wrong. @HolmesShuan

full error : Traceback (most recent call last): File "main.py", line 5, in <module> import model File "/content/EDSR-PyTorch/src/model/__init__.py", line 174 def forward_x8(self, *args, forward_function=None): ^ IndentationError: unindent does not match any outer indentation level