Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wangying1586 opened this issue Dec 18, 2019 · 3 comments

Comments

@wangying1586
Copy link

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
Copy link
Author

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

@WangLanxiao
Copy link

同样遇到这个问题

@niu1970
Copy link

niu1970 commented May 13, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants