Hello. I’m currently working on debugging a model I wrote using PyTorch.
When I first ran output = model(data) I got the error
*** RuntimeError: Expected tensor for argument #1 'indices' to have scalar type Long; but got torch.cuda.DoubleTensor instead (while checking arguments for embedding)

No problem, I simply ran output = model(data.long()). Then I got a:
*** RuntimeError: Expected object of device type cuda but got device type cpu for argument #1 'self' in call to _th_index_select

I wasn’t sure what the error message exactly meant, but I recalled that I hadn’t put my model on the GPU device. So I ran:
model = model.to('cuda')
output = model(data.long())

but this time I got a:
*** NotImplementedError

This was a bit unexpected, and I checked if I had put in a NotImplementedError anywhere in the code but I hadn’t. I’m having some difficulty finding helpful resources, as I don’t even know what the causing piece of code is.
Would anybody have any idea how I should handle this issue? Just an FYI, these errors occurred while I was in the PDB interactive shell.
Thanks in advance.