Skip to content

Commit e7be26a

Browse files
author
Sam Anklesaria
committed
Test for lfilter
1 parent bb98106 commit e7be26a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/torchaudio_unittest/test_me.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from torchaudio.functional.filtering import iir, sams_matmul
1+
from torchaudio.functional.filtering import iir, lfilter
22
import torch
33
from torch.autograd import gradcheck
44

@@ -11,3 +11,9 @@ def test_iir():
1111
w = torch.rand((1, 1, 10), requires_grad=True, dtype=torch.float64)
1212
a = torch.rand((1, 4), requires_grad=True, dtype=torch.float64)
1313
gradcheck(iir, (w, a))
14+
15+
def test_lfilter():
16+
w = torch.rand(10, requires_grad=True, dtype=torch.float64)
17+
a = torch.rand(4, requires_grad=True, dtype=torch.float64)
18+
b = torch.rand(4, requires_grad=True, dtype=torch.float64)
19+
gradcheck(lfilter, (w, a, b))

0 commit comments

Comments
 (0)