forked from pytorch/audio
-
Notifications
You must be signed in to change notification settings - Fork 0
Rebase to master #9
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1315) * Test with batches of differing items Issues that occur when different items in a batch influence one another will not present when a batch is composed of identical items. When checking the consistency of batched behavior, in order to catch these issues items should be different. Thus, use different items for the `functional` batch consistency tests wherever possible. * Generate different white noise in each channel Don't duplicate a single channel multiple times. Since this is used for testing, generate different noise in each channel so data leakage between channels can be detected. * Parameterize batch size in batch consistency tests Rather than creating a batch of 3 items in each test and slicing it to test two different batch sizes at once, parameterize the batch size on the TestFunctional class itself. This will generate a separate set of tests for each batch size (better isolating failures) and removes a leaky abstraction where the test calling `assert_batch_consistencies` had to know to give it a batch size greater than 1. * Check inputs too, to catch in-place operations Check inputs to the batch consistency operations too, to ensure any in-place operations operate the same on items as batches - not just that they output the same result. * Use much shorter sample for phaser test Using a 5-second signal for the phaser test takes a long time on CPU, much longer than the other batch consistency tests. Use a shorter signal instead. * Load dual-channel wav for VAD test The stereo wav has two channels, slightly offset, so they'll count as different items. * Load wav using common_utils, not torchaudio.load * Test pitch frequency with different freqs per item The pitch frequency batch test was using the same frequency for each item, which may not catch data leakage between items within a batch. Use different frequencies so these kinds of issues would be triggered, just like the other batch consistency tests. * Explain justification for single-item batch
Parameterize `test_create_fb` so each set of values are tested independently. Also explicitly skip on older versions of librosa (< 0.7.2) when `norm="slaney"`.
[ghstack-poisoned] Co-authored-by: Jeff Hwang <jeffhwang@fb.com>
* Parameterize `test_sliding_window_cmn` * Extract test naming function * Pass a spectrogram to `F.sliding_window_cmn` * Set manual seed for remaining rand calls in suite
* Refactor Kaldi compatibility tests Co-authored-by: Jeff Hwang <jeffhwang@fb.com>
* Fix install location and suffix for Windows
`SOX_SIGNED_16BIT_TO_SAMPLE` and `SOX_SIGNED_32BIT_TO_SAMPLE` uses left shift on signed integers, (negative values) which is UB. This PR replaces them (and other sox macros for `uint8` and `float` as well) with Tensor operations.
* Change the name of the specgram named `waveform` `F.sliding_window_cmn` takes a spectrogram as input (of shape `(..., freq, time)`). However, this spectrogram is named `waveform`. This appears to be an error, so rename this (and the output tensor) to reflect that both are spectrograms. * Correct tensor description in docstring The output tensor of `F.sliding_window_cmn` is also a spectrogram. Update the description to reflect this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.