File "D:/nuoyi/biaodian/BiLSTM-CRF-ChineseNER.pytorch-master/main.py", line 141, in
loss = train()
File "D:/nuoyi/biaodian/BiLSTM-CRF-ChineseNER.pytorch-master/main.py", line 79, in train
loss, _ = model(word, label, seq_lengths)
File "C:\Users\xiongxi.conda\envs\tf\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "D:\nuoyi\biaodian\BiLSTM-CRF-ChineseNER.pytorch-master\model.py", line 174, in forward
label_score = self.crf._score_sentence(output, labels)
File "D:\nuoyi\biaodian\BiLSTM-CRF-ChineseNER.pytorch-master\model.py", line 51, in _score_sentence
bsz_t = gather_index(temp.transpose(0, 1), tags[:, i + 1])
IndexError: index 3571 is out of bounds for dimension 1 with size 3571
我看了一下
ipdb> word.shape
torch.Size([50, 6351])
ipdb> label.shape
torch.Size([50, 3570])
请问这个是因为中间没有填充导致的吗?