-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Traceback (most recent call last):
File "D:\python-numpy\DL1-1\MathOCR-master\src\utilss\latexlang.py", line 23, in getitem
retval = self.idx_token[item]
KeyError: 'START'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\python-numpy\DL1-1\MathOCR-master\src\models\train.py", line 91, in
main()
File "D:\python-numpy\DL1-1\MathOCR-master\src\models\train.py", line 66, in main
dtrain, dtest, dvalid = build_im2latex(formulas_path,
File "D:\python-numpy\DL1-1\MathOCR-master\src\data\dataset.py", line 32, in build_im2latex
encoded_formulas = [tokenizer.encode(t, vocabulary) for t in tokenized_formulas]
File "D:\python-numpy\DL1-1\MathOCR-master\src\data\dataset.py", line 32, in
encoded_formulas = [tokenizer.encode(t, vocabulary) for t in tokenized_formulas]
File "D:\python-numpy\DL1-1\MathOCR-master\src\utilss\latexlang.py", line 64, in encode
return [vocabulary['START']] + [vocabulary[t] for t in sequence] + [vocabulary['END']]
File "D:\python-numpy\DL1-1\MathOCR-master\src\utilss\latexlang.py", line 30, in getitem
retval = self.idx_token['UNK']
KeyError: 'UNK'