print(torch.cuda.is_available())
if torch.cuda.is_available():
device = torch.device(‘cuda’)
y = torch.ones_like(x,device=device)
x = x.to(device)
print(torch.cuda.is_available())
if torch.cuda.is_available():
device = torch.device(‘cuda’)
y = torch.ones_like(x,device=device)
x = x.to(device)