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
rollback torch.norm() in spectrogram() #747
Conversation
rollback torch.norm() in spectrogram() to v0.4.0.
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.
Hi @lbjcom
Thanks for submitting the PR. Looks like you forgot to remove the slow implementation.
comment out `spec_f = complex_norm(spec_f, power=power)`.
Thanks for submitting this! It is indeed enough to address the original concern. However, as mentioned here, this affects any function invoking |
That's a good point! The reason I changed the But there's no change in |
Thanks for being careful! In this case though, changing |
I updated the code as you mentioned and found out that there's no problem in my training script. Thanks! |
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.
LGTM. Waiting on tests to finish before merging :)
rollback torch.norm() in spectrogram() to v0.4.0 because torch.norm() is very slow in CPU mode as mentioned in following issues:
torch.norm
is 113x slower thantorch.sqrt(a**2 + b**2)
#455