forked from mrq/DL-Art-School
Print some metrics from tacotron dataset when it croaks
This commit is contained in:
parent
0c4d6b1916
commit
b35d6ae028
|
@ -104,6 +104,9 @@ class TextMelLoader(torch.utils.data.Dataset):
|
||||||
except:
|
except:
|
||||||
reload = True
|
reload = True
|
||||||
if reload and self.max_mel_len != None and m.shape[-1] > self.max_mel_len:
|
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.
|
# 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))
|
rv = random.randint(0,len(self))
|
||||||
return self[rv]
|
return self[rv]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user