-
Notifications
You must be signed in to change notification settings - Fork 667
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 4 commits
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 |
---|---|---|
|
@@ -154,6 +154,19 @@ def test_vol(self, gain, gain_type): | |
waveform = get_whitenoise(sample_rate=sample_rate, duration=0.05, n_channels=2) | ||
self.assert_grad(transform, [waveform]) | ||
|
||
@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': True, 'norm_vars': True}, ), | ||
({'cmn_window': 500, 'min_cmn_window': 50, 'center': False, 'norm_vars': False}, ), | ||
]) | ||
def test_sliding_window_cmn(self, kwargs): | ||
sample_rate = 8000 | ||
transform = T.SlidingWindowCmn(**kwargs) | ||
waveform = get_whitenoise(sample_rate=sample_rate, duration=0.05, n_channels=2) | ||
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. The input to Can you use 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. From the doc of |
||
self.assert_grad(transform, [waveform]) | ||
|
||
@unittest.expectedFailure | ||
def test_timestretch_zeros_fail(self): | ||
"""Test that ``T.TimeStretch`` fails gradcheck at 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.
cmn_window =600
andmin_cmn_window=100
look too big for the input with8000 * 0.05 == 400
(then FFT applied) can you make them somewhat smaller than the number of frames in time axis of the input tensor?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.
thanks @mthrok will try to implement your suggestions