VideoCaption icon indicating copy to clipboard operation
VideoCaption copied to clipboard

调用model.py中的generate函数时,从序列单词表中查找单词构成描述时,序号对应的单词键值不存在

Open wangying1586 opened this issue 5 years ago • 3 comments

image

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)

想问问为什么会对应键值的单词不存在呢?

wangying1586 avatar Dec 18 '19 09:12 wangying1586

希望作者 ~~ 解答一下 万分感谢~~~

wangying1586 avatar Dec 18 '19 09:12 wangying1586

同样遇到这个问题

WangLanxiao avatar Jan 14 '20 06:01 WangLanxiao

我也想问这个问题,大佬们有解决的吗?

niu1970 avatar May 13 '20 02:05 niu1970