CaptainEven / VideoCaption

视频的文本摘要(标注),输入一段视频,通过深度学习网络和人工智能程序识别视频主要表达的意思(Input a video output a txt decribing the video)。
179 stars 54 forks source link

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

Open wangying1586 opened 4 years ago

wangying1586 commented 4 years ago

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 commented 4 years ago

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

WangLanxiao commented 4 years ago

同样遇到这个问题

niu1970 commented 4 years ago

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