csteinmetz1 / auraloss

Collection of audio-focused loss functions in PyTorch
Apache License 2.0
695 stars 66 forks source link

Nan Issue with STFTMagnitudeLoss #63

Closed dlfqhsdugod1106 closed 11 months ago

dlfqhsdugod1106 commented 11 months ago

Hello, First of all, thanks for the very useful library.

I found that the additional epsilon term is missing in auraloss/freq.py line 47-48 (torch.log). This part sometimes causes nan gradient. I modified the code by my own in my environment, but it would be helpful if the official code is also fixed.

Thanks.