Solved by iacob in post #7 
              
              
                Their syntax varies slightly, but they are equivalent: 




⠀
.to(name)
.to(device)
.cuda()




CPU
to('cpu')
to(torch.device('cpu'))
cpu()


Current GPU
to('cuda')
to(torch.device('cuda'))
cuda()


Specific GPU
to('cuda:1')
to(torch.device('cuda:1'))
cuda(device=1)



Note: the current cuda device …