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: indices should be either on cpu or on the same device as the indexed tensor (cpu) #81

Open
jiajia95Murphy opened this issue Apr 13, 2023 · 2 comments

Comments

@jiajia95Murphy
Copy link

VQA runtimeError with GPU
The command I entered:python demo_vqa.py with num_gpus=1 load_path="weights/vilt_vqa.ckpt"

20230413-195810

python: 3.8
CUDA: 11.7
pytorch: 1.13.0

@sri13
Copy link

sri13 commented May 10, 2023

Any resolution on this issue?

@happyphonon
Copy link

I don't know what's the cause, but manually add patch_index = patch_index.to("cuda:0") should fix this error.

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