sentences = [' '.join([self.ix2word[idx] for idx in sent]) for sent in sentences]
File "F:\Reference_code\VideoCaption-master\model.py", line 75, in
sentences = [' '.join([self.ix2word[idx] for idx in sent]) for sent in sentences]
KeyError: tensor(27)
File "F:\Reference_code\VideoCaption-master\model.py", line 75, in
sentences = [' '.join([self.ix2word[idx] for idx in sent]) for sent in sentences]
KeyError: tensor(27)
想问问为什么会对应键值的单词不存在呢?