Skip to content
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

Add references to VGG and Resnet variants #1088

Merged
merged 11 commits into from
Jul 4, 2019
27 changes: 18 additions & 9 deletions torchvision/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ def _resnet(arch, block, layers, pretrained, progress, **kwargs):


def resnet18(pretrained=False, progress=True, **kwargs):
"""Constructs a ResNet-18 model.
r"""ResNet-18 model from
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -230,7 +231,8 @@ def resnet18(pretrained=False, progress=True, **kwargs):


def resnet34(pretrained=False, progress=True, **kwargs):
"""Constructs a ResNet-34 model.
r"""ResNet-34 model from
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -241,7 +243,8 @@ def resnet34(pretrained=False, progress=True, **kwargs):


def resnet50(pretrained=False, progress=True, **kwargs):
"""Constructs a ResNet-50 model.
r"""ResNet-50 model from
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -252,7 +255,8 @@ def resnet50(pretrained=False, progress=True, **kwargs):


def resnet101(pretrained=False, progress=True, **kwargs):
"""Constructs a ResNet-101 model.
r"""ResNet-101 model from
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -263,7 +267,8 @@ def resnet101(pretrained=False, progress=True, **kwargs):


def resnet152(pretrained=False, progress=True, **kwargs):
"""Constructs a ResNet-152 model.
r"""ResNet-152 model from
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -274,7 +279,8 @@ def resnet152(pretrained=False, progress=True, **kwargs):


def resnext50_32x4d(pretrained=False, progress=True, **kwargs):
"""Constructs a ResNeXt-50 32x4d model.
r"""ResNeXt-50 32x4d model from
`"Aggregated Residual Transformation for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -287,7 +293,8 @@ def resnext50_32x4d(pretrained=False, progress=True, **kwargs):


def resnext101_32x8d(pretrained=False, progress=True, **kwargs):
"""Constructs a ResNeXt-101 32x8d model.
r"""ResNeXt-101 32x8d model from
`"Aggregated Residual Transformation for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -300,7 +307,8 @@ def resnext101_32x8d(pretrained=False, progress=True, **kwargs):


def wide_resnet50_2(pretrained=False, progress=True, **kwargs):
"""Constructs a Wide ResNet-50-2 model.
r"""Wide ResNet-50-2 model from
`"Wide Residual Networks" <https://arxiv.org/pdf/1605.07146.pdf>`_

The model is the same as ResNet except for the bottleneck number of channels
which is twice larger in every block. The number of channels in outer 1x1
Expand All @@ -317,7 +325,8 @@ def wide_resnet50_2(pretrained=False, progress=True, **kwargs):


def wide_resnet101_2(pretrained=False, progress=True, **kwargs):
"""Constructs a Wide ResNet-101-2 model.
r"""Wide ResNet-101-2 model from
`"Wide Residual Networks" <https://arxiv.org/pdf/1605.07146.pdf>`_

The model is the same as ResNet except for the bottleneck number of channels
which is twice larger in every block. The number of channels in outer 1x1
Expand Down
24 changes: 16 additions & 8 deletions torchvision/models/vgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def _vgg(arch, cfg, batch_norm, pretrained, progress, **kwargs):


def vgg11(pretrained=False, progress=True, **kwargs):
"""VGG 11-layer model (configuration "A")
r"""VGG 11-layer model (configuration "A") from
`"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -105,7 +106,8 @@ def vgg11(pretrained=False, progress=True, **kwargs):


def vgg11_bn(pretrained=False, progress=True, **kwargs):
"""VGG 11-layer model (configuration "A") with batch normalization
r"""VGG 11-layer model (configuration "A") with batch normalization
`"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -115,7 +117,8 @@ def vgg11_bn(pretrained=False, progress=True, **kwargs):


def vgg13(pretrained=False, progress=True, **kwargs):
"""VGG 13-layer model (configuration "B")
r"""VGG 13-layer model (configuration "B")
`"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -125,7 +128,8 @@ def vgg13(pretrained=False, progress=True, **kwargs):


def vgg13_bn(pretrained=False, progress=True, **kwargs):
"""VGG 13-layer model (configuration "B") with batch normalization
r"""VGG 13-layer model (configuration "B") with batch normalization
`"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -135,7 +139,8 @@ def vgg13_bn(pretrained=False, progress=True, **kwargs):


def vgg16(pretrained=False, progress=True, **kwargs):
"""VGG 16-layer model (configuration "D")
r"""VGG 16-layer model (configuration "D")
`"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -145,7 +150,8 @@ def vgg16(pretrained=False, progress=True, **kwargs):


def vgg16_bn(pretrained=False, progress=True, **kwargs):
"""VGG 16-layer model (configuration "D") with batch normalization
r"""VGG 16-layer model (configuration "D") with batch normalization
`"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -155,7 +161,8 @@ def vgg16_bn(pretrained=False, progress=True, **kwargs):


def vgg19(pretrained=False, progress=True, **kwargs):
"""VGG 19-layer model (configuration "E")
r"""VGG 19-layer model (configuration "E")
`"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand All @@ -165,7 +172,8 @@ def vgg19(pretrained=False, progress=True, **kwargs):


def vgg19_bn(pretrained=False, progress=True, **kwargs):
"""VGG 19-layer model (configuration 'E') with batch normalization
r"""VGG 19-layer model (configuration 'E') with batch normalization
`"Very Deep Convolutional Networks For Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>'_

Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
Expand Down