bearpaw / pytorch-pose

A PyTorch toolkit for 2D Human Pose Estimation.
GNU General Public License v3.0
1.1k stars 250 forks source link

AttributeError: 'module' object has no attribute 'interpolate' #71

Closed zhengyuezhi closed 5 years ago

zhengyuezhi commented 5 years ago

Evaluation only Traceback (most recent call last): File "example/mpii.py", line 352, in main(parser.parse_args()) File "example/mpii.py", line 94, in main loss, acc, predictions = validate(val_loader, model, criterion, args.num_classes, args.debug, args.flip) File "example/mpii.py", line 232, in validate output = model(input) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, kwargs) File "/usr/local/lib/python2.7/dist-packages/torch/nn/parallel/data_parallel.py", line 112, in forward return self.module(*inputs[0], *kwargs[0]) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(input, kwargs) File "/media/zhengyuezhi/ren/RMPE_Experience/pytorch-pose/pose/models/hourglass.py", line 168, in forward y = self.hgi File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, **kwargs) File "/media/zhengyuezhi/ren/RMPE_Experience/pytorch-pose/pose/models/hourglass.py", line 93, in forward return self._hour_glass_forward(self.depth, x) File "/media/zhengyuezhi/ren/RMPE_Experience/pytorch-pose/pose/models/hourglass.py", line 84, in _hour_glass_forward low2 = self._hour_glass_forward(n-1, low1) File "/media/zhengyuezhi/ren/RMPE_Experience/pytorch-pose/pose/models/hourglass.py", line 84, in _hour_glass_forward low2 = self._hour_glass_forward(n-1, low1) File "/media/zhengyuezhi/ren/RMPE_Experience/pytorch-pose/pose/models/hourglass.py", line 84, in _hour_glass_forward low2 = self._hour_glass_forward(n-1, low1) File "/media/zhengyuezhi/ren/RMPE_Experience/pytorch-pose/pose/models/hourglass.py", line 88, in _hour_glass_forward up2 = F.interpolate(low3, scale_factor=2) AttributeError: 'module' object has no attribute 'interpolate'

hello,Why am I getting this error, my configuration is python2.7, torch==0.4.0

bearpaw commented 5 years ago

Hi, we use interpolate instead of upsampling in the latest version of code because upsampling seems would be deprecated in the future version of PyTorch.

To avoid this problem, just update your pytorch to version 1.0. I'll update the Readme later.

bearpaw commented 5 years ago

interpolate was introduced in Pytorch 0.4.1. I am closing this issue for no further discussion.