Skip to content

Commit 766e96e

Browse files
authored
Merge pull request #415 from lfchener/fix-infer
fix the bug in data.py
2 parents ebf2f53 + bf5f7ce commit 766e96e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

data_utils/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ def _padding_batch(self, batch, padding_to=-1, flatten=False):
330330
axis=0)
331331
masks.append(mask)
332332
padded_audios = np.array(padded_audios).astype('float32')
333-
texts = np.expand_dims(np.array(texts).astype('int32'), axis=-1)
334333
if self._is_training:
334+
texts = np.expand_dims(np.array(texts).astype('int32'), axis=-1)
335335
texts = fluid.create_lod_tensor(
336336
texts, recursive_seq_lens=[text_lens], place=self._place)
337337
audio_lens = np.array(audio_lens).astype('int64').reshape([-1, 1])

deploy/demo_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
'data/librispeech/eng_vocab.txt',
4949
"Filepath of vocabulary.")
5050
add_arg('model_path', str,
51-
'./checkpoints/libri/params.latest.tar.gz',
51+
'./checkpoints/libri/step_final',
5252
"If None, the training starts from scratch, "
5353
"otherwise, it resumes from the pre-trained model.")
5454
add_arg('lang_model_path', str,

0 commit comments

Comments
 (0)