Runtime Error Inconsistenet sequence length: torch.LongTensor

test2 = Variable(torch.LongTensor(np.array(test2)),volatile = True)

test2gs is the list of 2 grams of all the sentence which can be maximum 10 length.

ERROR:
Traceback (most recent call last):
File “linear3.py”, line 291, in
trainup()
File “linear3.py”, line 239, in trainup
test2 = Variable(torch.LongTensor(np.array(test2)),volatile = True)
RuntimeError: inconsistent sequence length at index (0, 1, 6) - expected 7 but got 8

what is the question?

I have created the list of 2grams of sentence and now i am trying to convert it to a tensor but it is giving me an error of inconsistent sequence length
test2 is the list of list of 2grams of 10 sentence

Can you help me with this error?

can you give a longer snippet that can be run by me?