fix the text_data dim to fit the dim check in paddle develop version

pull/402/head
root 6 years ago
parent 517c027c5e
commit be11b4b9bb

@ -330,9 +330,10 @@ 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 = fluid.create_lod_tensor(
np.array(texts).astype('int32'),
texts,
recursive_seq_lens=[text_lens],
place=self._place)
audio_lens = np.array(audio_lens).astype('int64').reshape([-1, 1])

Loading…
Cancel
Save