Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about loudness based loss #151

Closed
faroit opened this issue Dec 11, 2022 · 2 comments
Closed

question about loudness based loss #151

faroit opened this issue Dec 11, 2022 · 2 comments

Comments

@faroit
Copy link

faroit commented Dec 11, 2022

x = torch.log(x + 1e-7) + self.a_weight

I understand that the loudness based distance is just an approximation but I wonder why its added to the log spectrogram instead of mulitplying. Furthermore, what about using a time-domain prefilter as implemented by @csteinmetz1:

https://github.com/csteinmetz1/auraloss/blob/e732234398ada867138be634dbf66f40360461a2/auraloss/perceptual.py#L124-L129

and then implement it like:

mse(self.log_stft(time_domain_prefilter(x)), self.log_stft(time_domain_prefilter(y)))

can you comment on some pro and cons of either way?

@domkirke
Copy link
Collaborator

in this code a_weight are also in db, such that the multiplications becomes an addition.

@faroit
Copy link
Author

faroit commented Jan 11, 2024

@domkirke ahhh... missed that 🤦 thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants