From b35d6ae028b4c3293de783ff0e9c3e30b3d3b2db Mon Sep 17 00:00:00 2001 From: James Betker Date: Thu, 12 Aug 2021 09:21:12 -0600 Subject: [PATCH] Print some metrics from tacotron dataset when it croaks --- codes/data/audio/nv_tacotron_dataset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codes/data/audio/nv_tacotron_dataset.py b/codes/data/audio/nv_tacotron_dataset.py index 44fe3c57..87bbb6d8 100644 --- a/codes/data/audio/nv_tacotron_dataset.py +++ b/codes/data/audio/nv_tacotron_dataset.py @@ -104,6 +104,9 @@ class TextMelLoader(torch.utils.data.Dataset): except: reload = True if reload and self.max_mel_len != None and m.shape[-1] > self.max_mel_len: + print(f"Exception {index} {reload}") + if not reload: + print(f"mel_len:{m.shape[-1]} fname: {p}") # It's hard to handle this situation properly. Best bet is to return the a random valid token and skew the dataset somewhat as a result. rv = random.randint(0,len(self)) return self[rv]