Skip to content

Commit 2fc5ac3

Browse files
committed
Exclude the large models from default_cfgs, failing github CI
1 parent 5aebad3 commit 2fc5ac3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_models.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ def test_model_backward(model_name, batch_size):
146146

147147
@pytest.mark.cfg
148148
@pytest.mark.timeout(300)
149-
@pytest.mark.parametrize('model_name', list_models(exclude_filters=NON_STD_FILTERS, include_tags=True))
149+
@pytest.mark.parametrize('model_name', list_models(
150+
exclude_filters=EXCLUDE_FILTERS + NON_STD_FILTERS, include_tags=True))
150151
@pytest.mark.parametrize('batch_size', [1])
151152
def test_model_default_cfgs(model_name, batch_size):
152153
"""Run a single forward pass with each model"""
@@ -172,6 +173,8 @@ def test_model_default_cfgs(model_name, batch_size):
172173
outputs = model.forward_features(input_tensor)
173174
assert outputs.shape[spatial_axis[0]] == pool_size[0], 'unpooled feature shape != config'
174175
assert outputs.shape[spatial_axis[1]] == pool_size[1], 'unpooled feature shape != config'
176+
if not isinstance(model, (timm.models.MobileNetV3, timm.models.GhostNet, timm.models.VGG)):
177+
assert outputs.shape[feat_axis] == model.num_features
175178

176179
# test forward after deleting the classifier, output should be poooled, size(-1) == model.num_features
177180
model.reset_classifier(0)

0 commit comments

Comments
 (0)