Commit 96b1fa72 authored by hwangjeff's avatar hwangjeff Committed by Facebook GitHub Bot
Browse files

Revise Griffin-Lim transform test to reduce execution time (#2037)

Summary:
Our Griffin-Lim autograd tests take a long time to run. This PR adjusts some parameters to shorten the run time.

For one of the four tests:
Before:
```
test/torchaudio_unittest/transforms/autograd_cpu_test.py . [100%]

======================== 1 passed in 517.35s (0:08:37) =========================
```

After:
```
test/torchaudio_unittest/transforms/autograd_cpu_test.py . [100%]

======================== 1 passed in 104.59s (0:01:44) =========================
```

Pull Request resolved: https://github.com/pytorch/audio/pull/2037

Reviewed By: mthrok

Differential Revision: D32726213

Pulled By: hwangjeff

fbshipit-source-id: c785323ab380aea4b63fb1683b557c8ae842f54e
parent e83d4177
......@@ -101,11 +101,12 @@ class AutogradTestMixin(TestBaseMixin):
[False, True],
)
def test_griffinlim(self, momentum, rand_init):
n_fft = 400
n_fft = 80
power = 1
n_iter = 3
n_iter = 2
spec = get_spectrogram(
get_whitenoise(sample_rate=8000, duration=0.05, n_channels=2),
get_whitenoise(sample_rate=8000, duration=0.01, n_channels=2),
n_fft=n_fft, power=power)
transform = _DeterministicWrapper(
T.GriffinLim(n_fft=n_fft, n_iter=n_iter, momentum=momentum, rand_init=rand_init, power=power))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment