fix integer data type for deepvoice3's data loader

This commit is contained in:
chenfeiyu 2020-03-19 03:26:46 +00:00
parent 37390d96b9
commit 0b96eeae13
1 changed files with 5 additions and 2 deletions

View File

@ -189,11 +189,14 @@ class DataCollector(object):
# text positions
text_mask = (np.arange(1, 1 + max_text_length) <= np.expand_dims(
text_lengths, -1)).astype(np.int64)
text_positions = np.arange(1, 1 + max_text_length) * text_mask
text_positions = np.arange(
1, 1 + max_text_length, dtype=np.int64) * text_mask
# decoder_positions
decoder_positions = np.tile(
np.expand_dims(np.arange(1, 1 + max_decoder_length), 0),
np.expand_dims(
np.arange(
1, 1 + max_decoder_length, dtype=np.int64), 0),
(batch_size, 1))
return (text_sequences, text_lengths, text_positions, mel_specs,