Solved by ptrblck in post #2 
              
              
                Changing the type to torch.cuda.FloatTensor would not only push the tensor to the default GPU but would also potentially transform the data type. 
The to('cuda:id') operation would only transform the tensor to the specified device as seen here: 
x = torch.tensor([1])
print(x.type())
> torch.LongTens…