Skip to content

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

Description

@anasAloklah

File "E:\Transformer-master\Batch.py", line 26, in create_masks
trg_mask = trg_mask & np_mask
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

In the past, he worked with me without problems, but after I format the device and download the programs and offices again,
this problem happened to me and I do not know the reason.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions