You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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
jxcodetw commentedon May 3, 2018
Where did you see this line of code in the tutorial?
Can you post some links?
planewave commentedon May 3, 2018
they are here:
tutorials/beginner_source/examples_tensor/two_layer_net_tensor.py
Line 26 in e55b6e2
tutorials/beginner_source/examples_autograd/two_layer_net_autograd.py
Line 21 in e55b6e2
gloriouskilka commentedon May 10, 2018
@jxcodetw Noticed it here https://pytorch.org/tutorials/beginner/pytorch_with_examples.html
Fix pytorch#233