KimythAnly / AGAIN-VC

This is the official implementation of the paper AGAIN-VC: A One-shot Voice Conversion using Activation Guidance and Adaptive Instance Normalization.
https://kimythanly.github.io/AGAIN-VC-demo/index
MIT License
111 stars 19 forks source link

oss_rec=nan #5

Closed dzlhk closed 3 years ago

dzlhk commented 3 years ago

51/51 [00:09<00:00, 5.42it/s, loss_rec=nan, steps=4230

KimythAnly commented 3 years ago

Hi, what dataset did you use?

hongyuntw commented 3 years ago

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

junaedifahmi commented 3 years ago

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?

KimythAnly commented 3 years ago

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.

junaedifahmi commented 3 years ago

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.