3d_pose_baseline_pytorch
3d_pose_baseline_pytorch copied to clipboard
Issue when running the test
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
seems you are using a lastest version of pytorch. You can try replace the loss.data[0] with loss.item()
dear @weigq, It conduct well on Ubuntu 18, Anaconda, Python 2.7, Pytorch 1.1 cuda. (replace the loss.data[0] with loss.item())