yes, nn.LSTM (and all of nn.*) cannot take LongTensor as input. (the only exceptions are that nn.Embedding takes IntTensor or LongTensor as inputs (because they are index lookups), and some loss functions which are around classification take LongTensors as the targets).