From 732e9ce1e3804ec7683a67580932552e12f03be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stardust=C2=B7=E5=87=8F?= Date: Sat, 23 Sep 2023 20:24:20 +0800 Subject: [PATCH] Update data_utils.py --- data_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_utils.py b/data_utils.py index 7f4bfbe..af7d601 100644 --- a/data_utils.py +++ b/data_utils.py @@ -208,7 +208,7 @@ class TextAudioSpeakerCollate: torch.LongTensor([x[1].size(1) for x in batch]), dim=0, descending=True ) - max_text_len = max([len(x[0]) for x in batch]) + max_text_len = max([batch[ids_sorted_decreasing[i]][7].size(1) for i in range(len(ids_sorted_decreasing))] + [len(x[0]) for x in batch]) max_spec_len = max([x[1].size(1) for x in batch]) max_wav_len = max([x[2].size(1) for x in batch])