ai-adv-lab/deepspeech.mxnet

keyError

fanlu opened this issue · 2 comments

fanlu commented

When I training LibriSpeech after validation I got an error below:
Traceback (most recent call last):
File "main.py", line 306, in
do_training(args=args, module=module, data_train=data_train, data_val=data_val)
File "/export/fanlu/deepspeech.mxnet/train.py", line 141, in do_training
for nbatch, data_batch in enumerate(data_val):
File "/export/fanlu/deepspeech.mxnet/stt_io_bucketingiter.py", line 132, in next
save_feature_as_csvfile=self.save_feature_as_csvfile)
File "/export/fanlu/deepspeech.mxnet/stt_datagenerator.py", line 185, in prepare_minibatch
label = labelUtil.convert_bi_graphemes_to_num(label)
File "/export/fanlu/deepspeech.mxnet/label_util.py", line 89, in convert_bi_graphemes_to_num
label_num.append(int(self.byChar[char]))
KeyError: u'pz'

Thank you for reporting I missed that dictionary should look also labels of validation set. I uploaded fix and tested but if you're meet error or bug again please let me know!

fanlu commented

It worked,thx