The error is raised, because you are feeding LongTensors to a matmul (e.g. via nn.Linear) somewhere in your model.
Based on your code I cannot see, how the input data is fed to the model, and it appears you are not passing anything to the model at all:
model()[data.train_mask]

but try to index the output?
Anyway, try to check the input.type() and make sure its float32.
You can transform tensors to this type via:
input = input.float()