aes-lac-2018 icon indicating copy to clipboard operation
aes-lac-2018 copied to clipboard

KeyError: 'lang' - in python train.py scripts/pt_BR-finetune.json

Open navarmn opened this issue 6 years ago • 1 comments

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 avatar Dec 23 '18 14:12 navarmn

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?

navarmn avatar Dec 23 '18 14:12 navarmn