From 0b96eeae13886d11c23a2573fc01b9a37bfe1740 Mon Sep 17 00:00:00 2001 From: chenfeiyu Date: Thu, 19 Mar 2020 03:26:46 +0000 Subject: [PATCH] fix integer data type for deepvoice3's data loader --- examples/deepvoice3/data.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/deepvoice3/data.py b/examples/deepvoice3/data.py index 0d0aaeb..4638174 100644 --- a/examples/deepvoice3/data.py +++ b/examples/deepvoice3/data.py @@ -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,