Solved by ptrblck in post #2 
              
              
                You could just use .to(), .type() or call the type method directly without specifying the device: 
x = torch.randn(1, device='cuda')
print(x.to(torch.double))
> tensor([1.4169], device='cuda:0', dtype=torch.float64)
print(x.double())
> tensor([1.4169], device='cuda:0', dtype=torch.float64)
print(x.t…