Fix random Gaussian generation (#2639)
Summary: This PR is meant to address the bug raised in issue https://github.com/pytorch/audio/issues/2634. In particular, previously the Box Muller transform was used to generate Gaussian variates for dithering based on `torch.rand` uniform variates, but it was incorrectly implemented (e.g. the same uniform variate was used as input to the transform, rather than two different uniform variates), which led to a different (non-Gaussian) distribution. This PR instead uses `torch.randn` to generate the Gaussian variates. Pull Request resolved: https://github.com/pytorch/audio/pull/2639 Reviewed By: mthrok Differential Revision: D39101144 Pulled By: carolineechen fbshipit-source-id: 691e49679f6598ef0a1675f6f4ee721ef32215fd
Showing
Please register or sign in to comment