Probably the tensor types (cuda vs cpu or float vs double or so). You could try printing type (input.data) and similar for tge weight.
type (input.data)
Best regards Thomas