"...git@developer.sourcefind.cn:OpenDAS/megatron-lm.git" did not exist on "3bec6514156f492e0dca171251d6d928842a3e89"
Unverified Commit b8ddeb35 authored by jimchen90's avatar jimchen90 Committed by GitHub
Browse files

Add subclass in model test classes (#727)



* add unittest in test_models

* update test method

* remove unittest main function
Co-authored-by: default avatarJi Chen <jimchen90@devfair0160.h2.fair>
parent e0f4c0ec
import torch import torch
from torchaudio.models import Wav2Letter, _MelResNet from torchaudio.models import Wav2Letter, _MelResNet
from . import common_utils
class TestWav2Letter:
class TestWav2Letter(common_utils.TorchaudioTestCase):
def test_waveform(self): def test_waveform(self):
batch_size = 2 batch_size = 2
...@@ -31,7 +33,7 @@ class TestWav2Letter: ...@@ -31,7 +33,7 @@ class TestWav2Letter:
assert out.size() == (batch_size, num_classes, 2) assert out.size() == (batch_size, num_classes, 2)
class TestMelResNet: class TestMelResNet(common_utils.TorchaudioTestCase):
def test_waveform(self): def test_waveform(self):
......
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