Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.11 KB | None | 0 0
  1. import torch
  2.  
  3. def my_main_function(device):
  4. t = torch.tensor(22)
  5. t = t.to(device)
  6. print(t)
  7. print(t.device)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement