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

Allow zero momentum in Griffin-Lim #601

Merged
merged 2 commits into from Apr 30, 2020
Merged

Conversation

f0k
Copy link
Contributor

@f0k f0k commented Apr 30, 2020

In contrast to the docstring, torchaudio.functional.griffinlim() currently requires momentum > 0. This PR fixes the code to require momentum >= 0, and also skips the momentum-related computation if momentum is a false-ish constant.

Hats off to librosa for that momentum trick, by the way, hadn't seen it before. And thanks for porting it!

Copy link
Contributor

@vincentqb vincentqb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Apr 30, 2020

Codecov Report

Merging #601 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #601      +/-   ##
==========================================
+ Coverage   88.65%   88.66%   +0.01%     
==========================================
  Files          21       21              
  Lines        2204     2206       +2     
==========================================
+ Hits         1954     1956       +2     
  Misses        250      250              
Impacted Files Coverage Δ
torchaudio/functional.py 95.49% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b457cb7...8a173f6. Read the comment docs.

@vincentqb vincentqb merged commit fe30f30 into pytorch:master Apr 30, 2020
@f0k f0k deleted the zero-momentum branch May 25, 2020 17:01
mpc001 pushed a commit to mpc001/audio that referenced this pull request Aug 4, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants