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

bad argument #2 to 'add' (sizes do not match at /torch-addons/cutorch/lib/THC/generated/../generic/THCTensorMathPointwise.cu:269)

krsandeep98 opened this issue · comments

local img_tr = nn.Dropout(0.5)(

This is the error which I am getting on running train.lua with mn-att-ques-im-hist encoder and gen decoder. And this error corresponds to the encoder forward pass in the forwardBackward function.
I am able to get it running by changing the params.imgFeatureSize (whose value is 4096) in the above-mentioned line to 512.
@abhshkdz

Could you paste the exact command you ran?

And are you sure you followed this note in the readme?

screen shot 2018-06-09 at 1 57 26 pm

I changed the parameters directly in the opts.lua file and there the value of imgSpatialSize was 14 and imgFeatureSize was 4096.

It might be easier to use something like this instead:

th train.lua -encoder mn-att-ques-im-hist -decoder gen -imgSpatialSize 14 -imgFeatureSize 512