Pytorch RuntimeError: Expected tensor for argument #1 ‘indices’ to have scalar type Long; but got CUDAType instead

I would suggest you to check the input type
I had the same issue which solved by converting the input type from int32 to int64.(running on win10)
ex:

x = torch.tensor(train).to(torch.int64)

Leave a Comment