Skip to content

Commit

Permalink
Merge branch 'main' into mobilenet-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Oct 11, 2023
2 parents 67dce75 + 7e2050f commit c65397d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions test/test_transforms_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@
from torchvision.transforms.v2.functional._utils import _get_kernel, _register_kernel_internal


# FIXME: Put this back once https://github.com/pytorch/vision/issues/8030
# and https://github.com/pytorch/pytorch/issues/110857 are addressed
# turns all warnings into errors for this module
# pytestmark = pytest.mark.filterwarnings("error")
pytestmark = pytest.mark.filterwarnings("error")


@pytest.fixture(autouse=True)
Expand Down
14 changes: 7 additions & 7 deletions torchvision/models/efficientnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def _efficientnet_conf(
class EfficientNet_B0_Weights(WeightsEnum):
IMAGENET1K_V1 = Weights(
# Weights ported from https://github.com/rwightman/pytorch-image-models/
url="https://download.pytorch.org/models/efficientnet_b0_rwightman-3dd342df.pth",
url="https://download.pytorch.org/models/efficientnet_b0_rwightman-7f5810bc.pth",
transforms=partial(
ImageClassification, crop_size=224, resize_size=256, interpolation=InterpolationMode.BICUBIC
),
Expand Down Expand Up @@ -511,7 +511,7 @@ class EfficientNet_B1_Weights(WeightsEnum):
class EfficientNet_B2_Weights(WeightsEnum):
IMAGENET1K_V1 = Weights(
# Weights ported from https://github.com/rwightman/pytorch-image-models/
url="https://download.pytorch.org/models/efficientnet_b2_rwightman-bcdf34b7.pth",
url="https://download.pytorch.org/models/efficientnet_b2_rwightman-c35c1473.pth",
transforms=partial(
ImageClassification, crop_size=288, resize_size=288, interpolation=InterpolationMode.BICUBIC
),
Expand All @@ -535,7 +535,7 @@ class EfficientNet_B2_Weights(WeightsEnum):
class EfficientNet_B3_Weights(WeightsEnum):
IMAGENET1K_V1 = Weights(
# Weights ported from https://github.com/rwightman/pytorch-image-models/
url="https://download.pytorch.org/models/efficientnet_b3_rwightman-cf984f9c.pth",
url="https://download.pytorch.org/models/efficientnet_b3_rwightman-b3899882.pth",
transforms=partial(
ImageClassification, crop_size=300, resize_size=320, interpolation=InterpolationMode.BICUBIC
),
Expand All @@ -559,7 +559,7 @@ class EfficientNet_B3_Weights(WeightsEnum):
class EfficientNet_B4_Weights(WeightsEnum):
IMAGENET1K_V1 = Weights(
# Weights ported from https://github.com/rwightman/pytorch-image-models/
url="https://download.pytorch.org/models/efficientnet_b4_rwightman-7eb33cd5.pth",
url="https://download.pytorch.org/models/efficientnet_b4_rwightman-23ab8bcd.pth",
transforms=partial(
ImageClassification, crop_size=380, resize_size=384, interpolation=InterpolationMode.BICUBIC
),
Expand All @@ -583,7 +583,7 @@ class EfficientNet_B4_Weights(WeightsEnum):
class EfficientNet_B5_Weights(WeightsEnum):
IMAGENET1K_V1 = Weights(
# Weights ported from https://github.com/lukemelas/EfficientNet-PyTorch/
url="https://download.pytorch.org/models/efficientnet_b5_lukemelas-b6417697.pth",
url="https://download.pytorch.org/models/efficientnet_b5_lukemelas-1a07897c.pth",
transforms=partial(
ImageClassification, crop_size=456, resize_size=456, interpolation=InterpolationMode.BICUBIC
),
Expand All @@ -607,7 +607,7 @@ class EfficientNet_B5_Weights(WeightsEnum):
class EfficientNet_B6_Weights(WeightsEnum):
IMAGENET1K_V1 = Weights(
# Weights ported from https://github.com/lukemelas/EfficientNet-PyTorch/
url="https://download.pytorch.org/models/efficientnet_b6_lukemelas-c76e70fd.pth",
url="https://download.pytorch.org/models/efficientnet_b6_lukemelas-24a108a5.pth",
transforms=partial(
ImageClassification, crop_size=528, resize_size=528, interpolation=InterpolationMode.BICUBIC
),
Expand All @@ -631,7 +631,7 @@ class EfficientNet_B6_Weights(WeightsEnum):
class EfficientNet_B7_Weights(WeightsEnum):
IMAGENET1K_V1 = Weights(
# Weights ported from https://github.com/lukemelas/EfficientNet-PyTorch/
url="https://download.pytorch.org/models/efficientnet_b7_lukemelas-dcc49843.pth",
url="https://download.pytorch.org/models/efficientnet_b7_lukemelas-c5b4e57e.pth",
transforms=partial(
ImageClassification, crop_size=600, resize_size=600, interpolation=InterpolationMode.BICUBIC
),
Expand Down

0 comments on commit c65397d

Please sign in to comment.