-
Notifications
You must be signed in to change notification settings - Fork 657
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
Fix return dtype in MVDR module #2376
Conversation
@nateanl has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have corresponding tests?
@nateanl has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. BTW can we move the implementation of MVDR into dedicated file, such as torchaudio/transforms/_mvdr.py
?
Sure, I prefer using Or you mean for this specific |
What I meant was to put all the multi channel transforms to dedicated script. |
Address #2375
The MVDR module internally transforms the dtype of complex tensors to
torch.complex128
for computation and transforms it back to the original dtype before returning the Tensor. However, it didn't convert back successfully due tospecgram_enhanced.to(dtype)
, which should bespecgram_enhanced = specgram_enhanced.to(dtype)
. Fix it to make the output dtype consistent with original input.