transforms test

This commit is contained in:
shahules786 2022-11-07 10:25:54 +05:30
parent c1d5e56ec0
commit fc33bd83b6
1 changed files with 4 additions and 0 deletions

View File

@ -12,3 +12,7 @@ def test_stft_istft():
spectrogram = stft(sample_input) spectrogram = stft(sample_input)
waveform = istft(spectrogram) waveform = istft(spectrogram)
assert sample_input.shape == waveform.shape assert sample_input.shape == waveform.shape
assert (
torch.isclose(waveform, sample_input).sum().item()
> sample_input.shape[-1] // 2
)