Skip to content

Commit 75c132a

Browse files
committed
Adding efficientnet_b3.
1 parent 697eee9 commit 75c132a

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

torchvision/models/efficientnet.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
from torchvision.models.mobilenetv3 import SqueezeExcitation
1616

1717

18-
__all__ = ["EfficientNet", "efficientnet_b0"]
18+
__all__ = ["EfficientNet", "efficientnet_b0", "efficientnet_b3"]
1919

2020

21-
model_urls = {
22-
"efficientnet_b0": None, # TODO: Add weights
21+
model_urls = { # TODO: Add weights
22+
"efficientnet_b0": None,
23+
"efficientnet_b3": None,
2324
}
2425

2526

@@ -235,3 +236,16 @@ def efficientnet_b0(pretrained: bool = False, progress: bool = True, **kwargs: A
235236
"""
236237
inverted_residual_setting = _efficientnet_conf(width_mult=1.0, depth_mult=1.0, **kwargs)
237238
return _efficientnet_model("efficientnet_b0", inverted_residual_setting, 0.2, pretrained, progress, **kwargs)
239+
240+
241+
def efficientnet_b3(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> EfficientNet:
242+
"""
243+
Constructs a EfficientNet B3 architecture from
244+
`"EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks" <https://arxiv.org/abs/1905.11946>`_.
245+
246+
Args:
247+
pretrained (bool): If True, returns a model pre-trained on ImageNet
248+
progress (bool): If True, displays a progress bar of the download to stderr
249+
"""
250+
inverted_residual_setting = _efficientnet_conf(width_mult=1.2, depth_mult=1.4, **kwargs)
251+
return _efficientnet_model("efficientnet_b3", inverted_residual_setting, 0.3, pretrained, progress, **kwargs)

0 commit comments

Comments
 (0)