Cadene / vqa.pytorch

Visual Question Answering in Pytorch
717 stars 178 forks source link

Hi cadene,why i get this error when i use demo? #34

Open Rechardgu opened 6 years ago

Rechardgu commented 6 years ago

RuntimeError: softmax(): argument 'input' (position 1) must be Variable, not torch.FloatTensor

Cadene commented 6 years ago

It depends on the version of torch you are using (it's fixed with the last version 0.4):

You should add this to hack it:

softmax(torch.autograd.Variable(input, requires_grad=False))