I got the same error:

RuntimeError: Expected object of scalar type Double but got scalar type Float for argument #2 ‘weight’

so I’m wondering why that error would happended?
and why it still wrong when I have converted the dataset to double?
why I must convert the model to double?