Randomize initial phase of sinusoid data in test (#2301)
Summary: This commit update `get_sinusoid` function in test utility so that when a multi channel is requested, non-primal channel have randomized initial phase. This adds some variety in test data which should not break the tests. Currently `get_sinusoid` returns identical waveforms for all the channels. This multi channel support was added just to mock the input data so that it is easy to test features with multi-channel inputs, so tests should not be expecting the all channels to be identical. When working on numerical parity, it is more useful if the raw waveforms are somewhat different. Image: waveforms generated by `get_sinusoid` after the change. left: 1st channel, right: 2nd channel <img width="524" alt="Screen Shot 2022-03-31 at 10 06 17 AM" src="https://user-images.githubusercontent.com/855818/161111163-1ea58ff6-51ee-4e37-bcd6-411041dd2603.png"> Pull Request resolved: https://github.com/pytorch/audio/pull/2301 Reviewed By: hwangjeff Differential Revision: D35291689 Pulled By: mthrok fbshipit-source-id: 9160d07ccdd1494acb6d41cb07ac434c0676dbfd
Showing
Please register or sign in to comment