Traceback (most recent call last): File "seq2seq.py", line 441, in <module> seq.train() File "seq2seq.py", line 211, in train inputs, targets = self.next(1, shuffle=False) File "seq2seq.py", line 193, in next inputs = Variable(torch.LongTensor(inputs)).transpose(1, 0).contiguous() RuntimeError: given sequence has an invalid size of dimension 2: 0 #6
这个错误是什么意思呢?
Traceback (most recent call last):
File "seq2seq.py", line 441, in
seq.train()
File "seq2seq.py", line 211, in train
inputs, targets = self.next(1, shuffle=False)
File "seq2seq.py", line 193, in next
inputs = Variable(torch.LongTensor(inputs)).transpose(1, 0).contiguous()
RuntimeError: given sequence has an invalid size of dimension 2: 0
这个错误是什么意思呢? Traceback (most recent call last): File "seq2seq.py", line 441, in
seq.train()
File "seq2seq.py", line 211, in train
inputs, targets = self.next(1, shuffle=False)
File "seq2seq.py", line 193, in next
inputs = Variable(torch.LongTensor(inputs)).transpose(1, 0).contiguous()
RuntimeError: given sequence has an invalid size of dimension 2: 0