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

KeyError in predictor.py class predict #51

Closed
yael432 opened this issue Oct 3, 2018 · 1 comment
Closed

KeyError in predictor.py class predict #51

yael432 opened this issue Oct 3, 2018 · 1 comment

Comments

@yael432
Copy link

yael432 commented Oct 3, 2018

line: 59

for f, y in zip(feature, label):
label = self.r_l_map[y]

label parameter passed from seq_wc is a tensor type, therefore self.r_l_map[y] raise a KeyError

I guess it should be label = self.r_l_map[y.item()] instead?

@LiyuanLucasLiu
Copy link
Owner

Thanks and fixed! Nice catch :-) #52
BTW, you may want to check our new implementation w. more powerful pre-trained models.
https://github.com/LiyuanLucasLiu/LightNER

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