thtran97 / Deep-Learning-for-Audio

Audio Classification & Sound Event Detection in Pytorch
5 stars 0 forks source link

NaN Loss when training Conv2D-model using log-mel spectrogram #3

Closed thtran97 closed 4 years ago

thtran97 commented 4 years ago

This is because there exists negative-infinite values in log mel spectrogram features. This leads to the nan value when doing loss.backward().

One of the solution that i made is : converting all these negative infinite values into zeros. I am not sure whether there are any better solutions ?