Skip to content

test/test_models::test_mobile_net_norm_layer is broken #5642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pmeier opened this issue Mar 18, 2022 · 0 comments · Fixed by #5643
Closed

test/test_models::test_mobile_net_norm_layer is broken #5642

pmeier opened this issue Mar 18, 2022 · 0 comments · Fixed by #5643

Comments

@pmeier
Copy link
Collaborator

pmeier commented Mar 18, 2022

vision/test/test_models.py

Lines 403 to 413 in 297e2b8

@pytest.mark.parametrize("model_fn", [models.mobilenet_v2, models.mobilenet_v3_large, models.mobilenet_v3_small])
def test_mobilenet_norm_layer(model_fn):
model = model_fn()
assert any(isinstance(x, nn.BatchNorm2d) for x in model.modules())
def get_gn(num_channels):
return nn.GroupNorm(32, num_channels)
model = model_fn(norm_layer=get_gn)
assert not (any(isinstance(x, nn.BatchNorm2d) for x in model.modules()))
assert any(isinstance(x, nn.GroupNorm) for x in model.modules())

fails on main due to pytorch/pytorch#74293.

cc @datumbox @pmeier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant