diff --git a/torchvision/models/resnet.py b/torchvision/models/resnet.py index c923c0a82c6..13bb6e69450 100644 --- a/torchvision/models/resnet.py +++ b/torchvision/models/resnet.py @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" `_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" `_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" `_ 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 @@ -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" `_ 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 diff --git a/torchvision/models/vgg.py b/torchvision/models/vgg.py index 0e72e99538c..fb1b7233a6a 100644 --- a/torchvision/models/vgg.py +++ b/torchvision/models/vgg.py @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet @@ -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" '_ Args: pretrained (bool): If True, returns a model pre-trained on ImageNet