hsinyuan-huang/FlowQA

RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #4 'other'

susht3 opened this issue · 2 comments

i use --resume, after i evaluate the model and then train, i get this error:

Traceback (most recent call last):
File "train_CoQA.py", line 229, in
main()
File "train_CoQA.py", line 122, in main
model.update(batch)
File "/home/susht3/workspace/flow/QA_model/model_CoQA.py", line 128, in update
self.optimizer.step()
File "/home/susht3/local/anaconda3/envs/susht/lib/python3.6/site-packages/torch/optim/adamax.py", line 75, in step
exp_avg.mul_(beta1).add_(1 - beta1, grad)
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #4 'other' [INFO/MainProcess] process shutting down

Hi, I met the same problem with you,have you resolved it?

pytorch/pytorch#2830 (comment)
this one worked for me.