update collate function, data loader not does not convert nested list into numpy array.
This commit is contained in:
parent
c6965e2c5a
commit
e54f23befd
|
@ -86,9 +86,10 @@ class LJSpeechCollector(object):
|
||||||
for i, _ in sorted(
|
for i, _ in sorted(
|
||||||
zip(mel_lens, text_lens), key=lambda x: x[1], reverse=True)
|
zip(mel_lens, text_lens), key=lambda x: x[1], reverse=True)
|
||||||
]
|
]
|
||||||
|
mel_lens = np.array(mel_lens, dtype=np.int64)
|
||||||
|
|
||||||
|
|
||||||
text_lens = sorted(text_lens, reverse=True)
|
text_lens = np.array(sorted(text_lens, reverse=True), dtype=np.int64)
|
||||||
|
|
||||||
# Pad sequence with largest len of the batch
|
# Pad sequence with largest len of the batch
|
||||||
texts = batch_text_id(texts, pad_id=self.padding_idx)
|
texts = batch_text_id(texts, pad_id=self.padding_idx)
|
||||||
|
|
Loading…
Reference in New Issue