Skip to content

Commit 7ff9741

Browse files
committed
Add TS test for comples Spectrogram
1 parent b395211 commit 7ff9741

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/torchaudio_unittest/transforms/torchscript_consistency_impl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ def test_Spectrogram(self):
2121
tensor = torch.rand((1, 1000))
2222
self._assert_consistency(T.Spectrogram(), tensor)
2323

24+
def test_Spectrogram_return_complex(self):
25+
tensor = torch.rand((1, 1000))
26+
self._assert_consistency(T.Spectrogram(power=None, return_complex=True), tensor)
27+
2428
def test_GriffinLim(self):
2529
tensor = torch.rand((1, 201, 6))
2630
self._assert_consistency(T.GriffinLim(length=1000, rand_init=False), tensor)

0 commit comments

Comments
 (0)