-
Notifications
You must be signed in to change notification settings - Fork 664
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
Adding test for T.SlidingWindowCmn #1482
Changes from 1 commit
d10930e
6ec8994
96e4606
a279859
c5256e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,7 +157,6 @@ def test_vol(self, gain, gain_type): | |
@parameterized.expand([ | ||
({'cmn_window': 600, 'min_cmn_window': 100, 'center': False, 'norm_vars': False}, ), | ||
({'cmn_window': 600, 'min_cmn_window': 100, 'center': True, 'norm_vars': False}, ), | ||
({'cmn_window': 600, 'min_cmn_window': 100, 'center': False, 'norm_vars': True}, ), | ||
({'cmn_window': 600, 'min_cmn_window': 100, 'center': False, 'norm_vars': False}, ), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this set of params is a duplicate of the first one -- could you change or remove it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for catching that, will There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the duplicate test case. Thanks! |
||
({'cmn_window': 500, 'min_cmn_window': 50, 'center': False, 'norm_vars': False}, ), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks @mthrok will try to implement your suggestions |
||
]) | ||
|
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.
@mthrok this set of params causes the test to fail with
RuntimeError: Jacobian mismatch for output 0 with respect to input 0
. Any idea why?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.
This means that when
norm_vars=True
, some operation is not differential to the 2nd degree.It's somewhere here but it is not immediately clear to me.
audio/torchaudio/functional/functional.py
Lines 1073 to 1100 in 0c263a9
What we want to do is
However, they are beyond the scope of this PR, so here, we can set
nondet_tol
and add docstring saying it's not 2nd-order differentiable whennorm_vars=True
, like in Spectrogram.audio/test/torchaudio_unittest/transforms/autograd_test_impl.py
Lines 71 to 77 in 0c263a9