From bf5f7cebb4d7ae7a37d572e34b1db96865407ebb Mon Sep 17 00:00:00 2001 From: lfchener Date: Mon, 20 Jan 2020 06:43:17 +0000 Subject: [PATCH] fix the bug in data.py --- data_utils/data.py | 2 +- deploy/demo_server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data_utils/data.py b/data_utils/data.py index a526da91..3628e067 100644 --- a/data_utils/data.py +++ b/data_utils/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]) diff --git a/deploy/demo_server.py b/deploy/demo_server.py index 68fcb245..37782d37 100644 --- a/deploy/demo_server.py +++ b/deploy/demo_server.py @@ -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,