diff --git a/tools/pnnx/tests/ncnn/test_torchaudio_F_inverse_spectrogram.py b/tools/pnnx/tests/ncnn/test_torchaudio_F_inverse_spectrogram.py index bc6c598b3e3a..5c19cca1d1a7 100644 --- a/tools/pnnx/tests/ncnn/test_torchaudio_F_inverse_spectrogram.py +++ b/tools/pnnx/tests/ncnn/test_torchaudio_F_inverse_spectrogram.py @@ -16,6 +16,7 @@ import torch.nn as nn import torch.nn.functional as F import torchaudio +from packaging import version class Model(nn.Module): def __init__(self): @@ -33,6 +34,9 @@ def forward(self, x, y, z, w): return out0, out1, out2, out3 def test(): + if version.parse(torchaudio.__version__) < version.parse('0.10.0'): + return True + net = Model() net.eval() diff --git a/tools/pnnx/tests/ncnn/test_torchaudio_InverseSpectrogram.py b/tools/pnnx/tests/ncnn/test_torchaudio_InverseSpectrogram.py index 143a88298559..e48c4d6411cc 100644 --- a/tools/pnnx/tests/ncnn/test_torchaudio_InverseSpectrogram.py +++ b/tools/pnnx/tests/ncnn/test_torchaudio_InverseSpectrogram.py @@ -16,6 +16,7 @@ import torch.nn as nn import torch.nn.functional as F import torchaudio +from packaging import version class Model(nn.Module): def __init__(self): @@ -38,6 +39,9 @@ def forward(self, x, y, z, w): return out0, out1, out2, out3 def test(): + if version.parse(torchaudio.__version__) < version.parse('0.10.0'): + return True + net = Model() net.eval() diff --git a/tools/pnnx/tests/test_torchaudio_F_inverse_spectrogram.py b/tools/pnnx/tests/test_torchaudio_F_inverse_spectrogram.py index 8bcff0088af7..92623934a38d 100644 --- a/tools/pnnx/tests/test_torchaudio_F_inverse_spectrogram.py +++ b/tools/pnnx/tests/test_torchaudio_F_inverse_spectrogram.py @@ -16,6 +16,7 @@ import torch.nn as nn import torch.nn.functional as F import torchaudio +from packaging import version class Model(nn.Module): def __init__(self): @@ -29,6 +30,9 @@ def forward(self, x, y, z, w): return out0, out1, out2, out3 def test(): + if version.parse(torchaudio.__version__) < version.parse('0.10.0'): + return True + net = Model() net.eval() diff --git a/tools/pnnx/tests/test_torchaudio_InverseSpectrogram.py b/tools/pnnx/tests/test_torchaudio_InverseSpectrogram.py index a07796f5b68d..7080ddd1267b 100644 --- a/tools/pnnx/tests/test_torchaudio_InverseSpectrogram.py +++ b/tools/pnnx/tests/test_torchaudio_InverseSpectrogram.py @@ -16,6 +16,7 @@ import torch.nn as nn import torch.nn.functional as F import torchaudio +from packaging import version class Model(nn.Module): def __init__(self): @@ -34,6 +35,9 @@ def forward(self, x, y, z, w): return out0, out1, out2, out3 def test(): + if version.parse(torchaudio.__version__) < version.parse('0.10.0'): + return True + net = Model() net.eval()