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: 'lang' - in python train.py scripts/pt_BR-finetune.json #6

Open
navarmn opened this issue Dec 23, 2018 · 1 comment
Open

Comments

@navarmn
Copy link

navarmn commented Dec 23, 2018

Traceback (most recent call last):
File "train.py", line 167, in
model = tu.finetune_model(model, args.config.model)
File "/home/navar/savoz/aes-lac-2018/codes/utils/training_utils.py", line 90, in finetune_model
num_classes = NUM_CLASSES[obj['lang']]
KeyError: 'lang'

@navarmn
Copy link
Author

navarmn commented Dec 23, 2018

I just found the line 89 in she training_utils.py is writen as num_classes = NUM_CLASSES[obj['lang']] and it change to fixed the bug:

num_classes = NUM_CLASSES[obj['langs'][0]]

Should I make a PR?

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

1 participant