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

Feat: Reduction option for SumAndDifferenceSTFTLoss #50

Open
zaptrem opened this issue Jan 14, 2023 · 1 comment
Open

Feat: Reduction option for SumAndDifferenceSTFTLoss #50

zaptrem opened this issue Jan 14, 2023 · 1 comment

Comments

@zaptrem
Copy link

zaptrem commented Jan 14, 2023

I'm currently trying to apply a different scalar to the loss of each element in a batch , but SumAndDifferenceSTFTLoss doesn't have the option to return element-wise losses (in most loss functions this is reduction="none"). Is this feasible to add?

@csteinmetz1
Copy link
Owner

Thanks @zaptrem.

After taking a look into this I see why it wasn't implemented in the first place. Handling operation for reduction = "none" is non-trivial for any loss that has multiple sub-components. We have been thinking for a while to provide a different interface for computing losses that would involve a Transform and a Distance which would make this behavior more clear. We might have to wait for this interface in order to support this feature. However, this use-case provides more reasoning to work on this.

I will keep this issue open for now, but follow #16 if you are interested.

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