Skip to content

Err in 'PyTorch: Tensors' running on GPU #233

Closed

Description

@planewave

# dtype = torch.device("cuda:0") # Uncomment this to run on GPU
it is supposed to be
# device = torch.device("cuda:0") # Uncomment this to run on GPU
same issue in PyTorch: Tensors and autograd

So x = torch.randn(N, D_in, device=device, dtype=dtype) is the new recommended style to create tensors?

Activity

  1. jxcodetw commented on May 3, 2018

    @jxcodetw
    Contributor

    Where did you see this line of code in the tutorial?
    Can you post some links?

  2. planewave commented on May 3, 2018

    @planewave
    Author

    they are here:

    # dtype = torch.device("cuda:0") # Uncomment this to run on GPU

    # dtype = torch.device("cuda:0") # Uncomment this to run on GPU

  3. gloriouskilka commented on May 10, 2018

    @gloriouskilka
  4. added a commit that references this issue on Nov 29, 2021
    2a53e26
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions