未验证 提交 766e96e6 编写于 作者: L Li Fuchen 提交者: GitHub

Merge pull request #415 from lfchener/fix-infer

fix the bug in data.py
......@@ -330,8 +330,8 @@ class DataGenerator(object):
axis=0)
masks.append(mask)
padded_audios = np.array(padded_audios).astype('float32')
texts = np.expand_dims(np.array(texts).astype('int32'), axis=-1)
if self._is_training:
texts = np.expand_dims(np.array(texts).astype('int32'), axis=-1)
texts = fluid.create_lod_tensor(
texts, recursive_seq_lens=[text_lens], place=self._place)
audio_lens = np.array(audio_lens).astype('int64').reshape([-1, 1])
......
......@@ -48,7 +48,7 @@ add_arg('vocab_path', str,
'data/librispeech/eng_vocab.txt',
"Filepath of vocabulary.")
add_arg('model_path', str,
'./checkpoints/libri/params.latest.tar.gz',
'./checkpoints/libri/step_final',
"If None, the training starts from scratch, "
"otherwise, it resumes from the pre-trained model.")
add_arg('lang_model_path', str,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册