You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering following error. Can somebody help me to resolve this issue?
python eval.py --model no_finetune/att2in/model-best.pth --infos_path no_finetune/att2in/infos_a2i-best.pkl --image_folder ../images/ --num_images 5
DataLoaderRaw loading images from folder: ../images/
0
listing all images in directory ../images/
DataLoaderRaw found 4 images
Traceback (most recent call last):
File "eval.py", line 122, in
vars(opt))
File "/home/prince/imageCaptioning/ImageCaptioning.pytorch/eval_utils.py", line 102, in eval_split
seq, _ = model.sample(fc_feats, att_feats, eval_kwargs)
File "/home/prince/imageCaptioning/ImageCaptioning.pytorch/models/Att2inModel.py", line 197, in sample
return self.sample_beam(fc_feats, att_feats, opt)
File "/home/prince/imageCaptioning/ImageCaptioning.pytorch/models/Att2inModel.py", line 186, in sample_beam
self.done_beams[k] = self.beam_search(state, logprobs, tmp_fc_feats, tmp_att_feats, tmp_p_att_feats, opt=opt)
File "/home/prince/imageCaptioning/ImageCaptioning.pytorch/models/CaptionModel.py", line 105, in beam_search
state)
File "/home/prince/imageCaptioning/ImageCaptioning.pytorch/models/CaptionModel.py", line 50, in beam_step
candidate_logprob = beam_logprobs_sum[q] + local_logprob
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #3 'other'
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #3 'other'
I have a GPU and I have confirmed that torch is using that GPU
The text was updated successfully, but these errors were encountered:
I am encountering following error. Can somebody help me to resolve this issue?
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #3 'other'
I have a GPU and I have confirmed that torch is using that GPU
The text was updated successfully, but these errors were encountered: