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

while i choose O2 to train model, bug: Expected tensor for argument #1 'input' to have the same device as tensor for argument #2 'weight'; but device 1 does not equal 0 (while checking arguments for cudnn_convolution) #826

Open
jiangx25 opened this issue May 6, 2020 · 2 comments

Comments

@jiangx25
Copy link

jiangx25 commented May 6, 2020

No description provided.

@jiangx25
Copy link
Author

jiangx25 commented May 6, 2020

while i choose O2 to train model, bug: Expected tensor for argument #1 'input' to have the same device as tensor for argument #2 'weight'; but device 1 does not equal 0 (while checking arguments for cudnn_convolution)

@jiangx25
Copy link
Author

jiangx25 commented May 6, 2020

model.train()
if torch.cuda.device_count() > 1:
print('true')
net = nn.DataParallel(model)
else:
net = model

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

1 participant