batra-mlp-lab / visdial

[CVPR 2017] Torch code for Visual Dialog

Home Page:https://arxiv.org/abs/1611.08669

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid permutation error reading image feature you gave

gicheonkang opened this issue · comments

Hi, I just want to run the pretrained model but error occurs reading image features
(Invalid permutation error).

I downloaded preprocessed data below.

preprocessed data (data/)
visdial_data_trainval.h5, visdial_params_trainval.json, data_img_vgg16_relu7_trainval.h5

pretrained model (checkpoints/)
lf-att-ques-im-hist-disc-vgg16-24.t7

I run the command below (test set)
th evaluate.lua -loadPath checkpoints/lf-att-ques-im-hist-disc-vgg16-24.t7 -gpuid 0 -split test

stack trace
{
useGt : false
inputQues : "data/visdial_data_trainval.h5"
batchSize : 30
split : "test"
loadPath : "checkpoints/lf-att-ques-im-hist-disc-vgg16-24.t7"
inputJson : "data/visdial_params_trainval.json"
saveRanks : true
saveRankPath : "models/test.json"
backend : "cudnn"
gpuid : 1
inputImg : "data/data_img_vgg16_relu7_trainval.h5"
}
DataLoader loading json file: data/visdial_params.json
Vocabulary size (with ,): 11403

DataLoader loading h5 file: data/visdial_data.h5
DataLoader loading h5 file: data/data_img.h5
Reading image features..
/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/torch/Tensor.lua:543: Invalid permutation
stack traceback:

[C]: in function 'assert'
/root/torch/install/share/lua/5.1/torch/Tensor.lua:543: in function 'permute'
dataloader.lua:71: in function 'initialize'
evaluate.lua:81: in main chunk
[C]: in function 'dofile'
/root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406670

lf-att uses pool5 features, not relu7 features. pool5 features are available here as well: https://github.com/batra-mlp-lab/visdial#v10.

Alternatively, you should be able to evaluate any non-attention-based model checkpoint with these data files.

@abhshkdz oh, thank you very much.