rajeevyasarla / UMSN-Face-Deblurring

Deblurring Face Images using Uncertainty Guided Multi-Stream Semantic Networks
MIT License
118 stars 34 forks source link

Hi, i get a AttributeError. #2

Closed liuji93 closed 5 years ago

liuji93 commented 5 years ago

While running the test_face_deblur.py , i see AttributeError:'module' object has no attribute 'interpolate' in line 236. The problem is from function 'torch.nn.functional.interpolate'

rajeevyasarla commented 5 years ago

Are you using Pytorch 0.4.1 version

liuji93 commented 5 years ago

yes,is there other function that can replace torch.nn.functional.interpolate in 0.4.0 version

Ji Liu

邮箱:joy_liuji@163.com |

Signature is customized by Netease Mail Master

On 08/06/2019 22:16, rajeevyasarla wrote:

Are you using Pytorch 0.4.1 version

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

rajeevyasarla commented 5 years ago

Can you check your pytorch version?, Since torch.nn.functional.interpolate is introduced from the pytorch version >=0.4.0 Earlier torch.nn.Upsample is used for upsampling in pytorch 0.3.1 If you are using the pytorch version >=0.4, you shouldn't get AttributeError:'module' object has no attribute 'interpolate'

liuji93 commented 5 years ago

The version is 0.4.0. I can not find the torch.nn.functional.interpolate in 0.4.0 API. The torch.nn.functional.interpolate used in line 236 is to downsample or upsample?

rajeevyasarla commented 5 years ago

in line 236 torch.nn.functional.interpolate is used to downsample the input blurry. So you can replace line 236 with val_inputv_256 = torch.nn.functional.avg_pool2d(val_inputv, 2)

liuji93 commented 5 years ago

That works. Thanks for your help.