def test_custom_module(verbose: bool = False): model = Model( os.path.join("tests", "test_configs", "custom_module_model.yaml"), verbose=verbose, ) assert model(torch.rand(1, 3, 32, 32)).shape == torch.Size([1, 10]) assert count_model_params(model) == 138568
def test_show_case(self, verbose: bool = False): """Test show case model.""" model = Model( os.path.join("tests", "test_configs", "show_case.yaml"), verbose=verbose, ) assert model(TestModelParser.INPUT).shape == torch.Size([1, 10]) assert count_model_params(model) == 168866
def test_gap_model(self, verbose: bool = False): """Test example model.""" model = Model( os.path.join("tests", "test_configs", "gap_test_model.yaml"), verbose=verbose, ) assert model(TestModelParser.INPUT).shape == torch.Size([1, 10]) assert count_model_params(model) == 20148
def test_vgg(self, verbose: bool = False): """Test vgg model.""" model = Model(os.path.join("tests", "test_configs", "vgg.yaml"), verbose=verbose) assert model(TestModelParser.INPUT).shape == torch.Size([1, 10]) assert count_model_params(model) == 3732970