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 #8

Open
liuzt1024 opened this issue Oct 27, 2021 · 3 comments
Open

RuntimeError #8

liuzt1024 opened this issue Oct 27, 2021 · 3 comments

Comments

@liuzt1024
Copy link

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:2 and cuda:0!

@jianpursuit
Copy link

We didn't encounter the similar problem, can you provide more information about this RuntimeError?

@liuzt1024
Copy link
Author

after this function:tood_head.py
losses_cls, losses_bbox,
cls_avg_factors, bbox_avg_factors = multi_apply(self.loss_single)
print(f'bbox_avg_factors : {bbox_avg_factors}')
get result:
bbox_avg_factors : [tensor(49.6258, device='cuda:3'), tensor(14.4483, device='cuda:3'), tensor(0, device='cuda:0'), tensor(0, device='cuda:0'), tensor(0, device='cuda:0')]

@liuzt1024
Copy link
Author

I use gpu3 for training
cls_avg_factors : [tensor(0., device='cuda:3'), tensor(0., device='cuda:3'), tensor(9., device='cuda:3'), tensor(9., device='cuda:3'), tensor(0., device='cuda:3')]
bbox_avg_factors : [tensor(0, device='cuda:0'), tensor(0, device='cuda:0'), tensor(6.4019, device='cuda:3'), tensor(6.3117, device='cuda:3'), tensor(0, device='cuda:0')]

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

2 participants