What does the error "IndexError: list index out of range"?

Hello.

Trying to test a model of the neural network project
https://github.com/torralba-lab/im2recipe-Pytorch

But when testing I receive an error
~/im2recipe-Pytorch$ python test.py --no-cuda --model_path=snapshots/model_e220_v-4.700.pth.tar
Downloading: "https://download.pytorch.org/models/resnet50-19c8e357.pth" to /home/rabbit/.torch/models/resnet50-19c8e357.pth
100%|████████████████████████| 102502400/102502400 [00:33<00:00, 3027106.84 it/s]
=> loading checkpoint 'snapshots/model_e220_v-4.700.pth.tar'
=> loaded checkpoint 'snapshots/model_e220_v-4.700.pth.tar' (epoch 220)
/home/rabbit/.local/lib/python2.7/site-packages/torchvision/transforms/transforms.py:188: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
 "please use transforms.Resize instead.")
Test loader prepared.
test.py:96: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
 v = torch.autograd.Variable(input[j], volatile=True)
test.py:100: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
 v = torch.autograd.Variable(target[j], volatile=True)
Traceback (most recent call last):
 File "test.py", line 176, in <module>
main()
 File "test.py", line 80, in main
 test(test_loader, model, criterion)
 File "test.py", line 104, in test
 output = model(input_var[0],input_var[1], input_var[2], input_var[3], input_var[4])
IndexError: list index out of range


What's the matter?
March 12th 20 at 08:00
0 answer

Find more questions by tags Python