Hello,
This is just because LSTM expects Float in input, and your data is Long. Use this code
for seq, y_train in train_data:
    seq = seq.type(torch.float32)
    optimizer.zero_grad()
    y_pred = model(seq)
    loss = criterion(y_pred, y_train)
    loss.backward()
    optimizer.step()