weigq / 3d_pose_baseline_pytorch

A simple baseline for 3d human pose estimation in PyTorch.
MIT License
365 stars 64 forks source link

Issue when running the test #10

Open KristianDukov opened 5 years ago

KristianDukov commented 5 years ago

Running on Windows 10 Python Python 3.6.7

When trying to run the test with the given model from google drive and the dataset, I get the following error:

TEST on Directions [?25lTraceback (most recent call last): File "main.py", line 283, in main(option) File "main.py", line 94, in main _, err_test = test(test_loader, model, criterion, stat_3d, procrustes=opt.procrustes) File "main.py", line 228, in test losses.update(loss.data[0], inputs.size(0)) IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number

weigq commented 5 years ago

seems you are using a lastest version of pytorch. You can try replace the loss.data[0] with loss.item()

NguyenDangBinh commented 5 years ago

dear @weigq, It conduct well on Ubuntu 18, Anaconda, Python 2.7, Pytorch 1.1 cuda. (replace the loss.data[0] with loss.item())