XuecaiHu / Meta-SR-Pytorch

Meta-SR: A Magnification-Arbitrary Network for Super-Resolution (CVPR2019)
551 stars 121 forks source link

RuntimeError: "floor" not implemented for 'torch.LongTensor'如何解决 #44

Closed mdswyz closed 3 years ago

Wjppppp commented 4 years ago

I have the same problem with you, did you solve it?

yooken233 commented 4 years ago

I have the same problem with you, did you solve it?

I got this problem, too. did you solve it bro?

yooken233 commented 4 years ago

I have the same problem with you, did you solve it?

I got this problem, too. did you solve it bro?

Oh i think i have solved it. Use torch.arange(0., outH, 1.).mul(1.0 / scale) instead of torch.arange(0, outH, 1).mul(1.0 / scale).

BlackGuang commented 4 years ago

from h_project_coord = torch.arange(0, outH, 1).mul(1.0 / scale) to h_project_coord = torch.arange(0., outH, 1.).mul(1.0 / scale) I have solved it too. Just like yooken233 I have this idea from https://stackoverflow.com/questions/52922445/runtimeerror-exp-not-implemented-for-torch-longtensor