Expected tensor for argument #1 ‘indices’ to have scalar type Long; but got CPUFloatTensor instead (while checking arguments for embedding)
After many google searches and stackoverflow crawling, I figured out that the error was caused by the following line of code
dataset = TensorDataset(torch.Tensor(features), torch.Tensor(target))
Changed it to
dataset = TensorDataset(torch.tensor(features), torch.tensor(target))
and it fixed the issue