zeke:

print(device)


I believe torch.device() expects a type, what you want is
device = torch.device(“cuda” if torch.cuda.is_available() else “cpu”)
your tensor will be routed to the CUDA current device.