Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
susht3 opened this issue Dec 17, 2018 · 2 comments

Comments

@susht3
Copy link

susht3 commented Dec 17, 2018

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

@zou-longkun
Copy link

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

@Baggsy
Copy link

Baggsy commented May 3, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants