XuecaiHu/Meta-SR-Pytorch

Question about the code

codyshen0000 opened this issue · 4 comments

Hi , in your paper , there is no descriptions about the "unfold " operation, but I found in your code. Can you give me some guidance why using unfold operation? Looking forward to your reply, thanks!

cols = nn.functional.unfold(up_x, 3,padding=1)

Hi, do you see any errors in meta.py, saying 'ValueError: only one element tensors can be converted to Python scalars'? Thanks!

Sorry, I haven't run meta.py. But I think there may be something wrong with your input data

Hi,

I think the unfold function is used for color channels. There are three color channels, so you have to select the tensors with a stride of three.

Hi, i think the unfold is to extract the k x k patch around every pixel in the up_x, so as to do the matmul with the local weight, just like the right bottom part of Figure 1 in the paper.