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 want to visualize the results, but when I run python inference.py,it broke an error:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper__index_select)
The text was updated successfully, but these errors were encountered:
Hi,
This issue can be resolved by changing the following two lines:
output, _ = model(image[None],0)
output = postprocessors['bbox'](output, torch.Tensor([[1.0, 1.0]]))[0]
to --->
output, _ = model.cuda()(image[None].cuda(),0)
output = postprocessors['bbox'](output, torch.Tensor([[1.0, 1.0]]).cuda())[0]
I want to visualize the results, but when I run python inference.py,it broke an error:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper__index_select)
The text was updated successfully, but these errors were encountered: