RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
Opened this issue · 1 comments
xiaoxiongtao commented
Dear author:
I am a beginner. I get a problem like "RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)" when I try to run your code, could you please tell me how to fix it?
Looking forward to your response
vimar-gu commented
Hi! Sorry for the late reply. Can you show the code line number where the error occurs? It might probably be due to inconsistent device settings.