Merge branch 'master' into 'master'

fix integer data type for deepvoice3's data loader

See merge request !45
This commit is contained in:
liuyibing01 2020-03-19 11:50:38 +08:00
commit 6c38b2424e
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,