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

w2idx['hellow']错误 #2

Open
LilyDreamZhao opened this issue Sep 6, 2018 · 1 comment
Open

w2idx['hellow']错误 #2

LilyDreamZhao opened this issue Sep 6, 2018 · 1 comment

Comments

@LilyDreamZhao
Copy link

LilyDreamZhao commented Sep 6, 2018

运行train.py没有错误,我把step调节很小,仅仅想测试一下。
运行test_model.py出现错误Interrupted: 1 errors during collection
接着我单独试试word_id_test.py ids.append(self.w2idx[word])错误,KeyError:'hello'
请问什么原因尼?

update:我打印test_model.py中init函数过后,w2idx里面没有'hello',所以当然错误。是不是没有train好,'hello'不在里面?

@sea-boat
Copy link
Owner

sea-boat commented Sep 6, 2018

对,用data.py处理下。

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

2 participants