word is probably a LongTensor, which will yield this error.
You can transform it to a FloatTensor by calling .float() on it:
word = word.float()
prediction = model(word)

Not relevant for this error, but which loss function are you using?