Is there any difference between following code:
x = torch.randn(2, 2, device=torch.device("cpu"), requires_grad=Ture).cuda()

x = torch.randn(2, 2, device=torch.device("cuda"), requires_grad=Ture)

when I use the first one, I can not get the grad of x by loss.backward(), and the second one is work.