"test/vscode:/vscode.git/clone" did not exist on "64956d54b2b2be9681da01fe214277a0eef05be2"
Unverified Commit 7d034ea7 authored by Krishna Kalyan's avatar Krishna Kalyan Committed by GitHub
Browse files

Add autograd test for T.Fade (#1424)

parent 90311ed1
...@@ -77,3 +77,9 @@ class AutogradTestMixin(TestBaseMixin): ...@@ -77,3 +77,9 @@ class AutogradTestMixin(TestBaseMixin):
transform = T.Resample(orig_freq=orig_freq, new_freq=new_freq) transform = T.Resample(orig_freq=orig_freq, new_freq=new_freq)
waveform = get_whitenoise(sample_rate=8000, duration=0.05, n_channels=2) waveform = get_whitenoise(sample_rate=8000, duration=0.05, n_channels=2)
self.assert_grad(transform, [waveform]) self.assert_grad(transform, [waveform])
@parameterized.expand([("linear", ), ("exponential", ), ("logarithmic", ), ("quarter_sine", ), ("half_sine", )])
def test_fade(self, fade_shape):
transform = T.Fade(fade_shape=fade_shape)
waveform = get_whitenoise(sample_rate=8000, duration=0.05, n_channels=2)
self.assert_grad(transform, [waveform], nondet_tol=1e-10)
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