Closed dzlhk closed 3 years ago
Hi, what dataset did you use?
I have this probelm too and i use my own dataset the error maybe from preprocess.py the mel's numpy array will get some -inf element
Hey, I got this problem too with my own dataset. But I checked the output from the module which produces the Mel spectrogram (preprocessor/base.py/preprocess_one
). I tried to ensure whether my dataset has nan or inf on the output, but the program can not detect any inf or nan on the Mel spectrogram output. and I don't know where I might do wrong.
I also have a question on the melspectrogram function that you used, why don't you use the builtin librosa Mel spectrogram function instead of defining it by yourself?
Hi, maybe setting detect_anomaly
to see what causes the loss becoming NaN is what you need. Please refer to the pytorch doc.
Also, since Mel-GAN has its own preprocessing procedure, I just use it rather than the built-in librosa funciton.
My data using sample rate in 16KHz, but even after I adjust other setting like n_fft etc, it still produce the error. But after I upsample my data into 22KHz it works fine.
51/51 [00:09<00:00, 5.42it/s, loss_rec=nan, steps=4230