From 2d4ff9bd1179e29986f03d277e7d7d05a2ed4b15 Mon Sep 17 00:00:00 2001 From: Giuseppe Franco Date: Fri, 17 Nov 2023 14:30:03 +0000 Subject: [PATCH] Fix (tests): skip effnetb0 with torch 2.1 --- tests/brevitas_end_to_end/test_torchvision_models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/brevitas_end_to_end/test_torchvision_models.py b/tests/brevitas_end_to_end/test_torchvision_models.py index b554c8113..e8c34d961 100644 --- a/tests/brevitas_end_to_end/test_torchvision_models.py +++ b/tests/brevitas_end_to_end/test_torchvision_models.py @@ -73,6 +73,11 @@ def torchvision_model(model_name, quantize_fn): if torch_version < version.parse('1.11.0') and model_name == 'vit_b_32': return None + # Due to a regression in torchvision, we cannot load pretrained weights for effnet_b0 + # https://github.com/pytorch/vision/issues/7744 + if torch_version == version.parse('2.1.0') and model_name == 'efficientnet_b0': + return None + # Deeplab and fcn are in a different module, and they have a dict as output which is not suited for torchscript if model_name in ('deeplabv3_resnet50', 'fcn_resnet50'): model_fn = getattr(modelzoo.segmentation, model_name)