csteinmetz1 / auraloss

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

Nan Issue with STFTMagnitudeLoss #63

Closed dlfqhsdugod1106 closed 1 year ago

dlfqhsdugod1106 commented 1 year 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.