@@ -556,12 +556,23 @@ class Wide_ResNet101_2_Weights(WeightsEnum):
556
556
557
557
@handle_legacy_interface (weights = ("pretrained" , ResNet18_Weights .IMAGENET1K_V1 ))
558
558
def resnet18 (* , weights : Optional [ResNet18_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> ResNet :
559
- r"""ResNet-18 model from
560
- `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_.
559
+ """ResNet-18 from `Deep Residual Learning for Image Recognition <https://arxiv.org/pdf/1512.03385.pdf>`__.
561
560
562
561
Args:
563
- weights (ResNet18_Weights, optional): The pretrained weights for the model
564
- progress (bool): If True, displays a progress bar of the download to stderr
562
+ weights (:class:`~torchvision.models.ResNet18_Weights`, optional): The
563
+ pretrained weights to use. See
564
+ :class:`~torchvision.models.ResNet18_Weights` below for
565
+ more details, and possible values. By default, no pre-trained
566
+ weights are used.
567
+ progress (bool, optional): If True, displays a progress bar of the
568
+ download to stderr. Default is True.
569
+ **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet``
570
+ base class. Please refer to the `source code
571
+ <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
572
+ for more details about this class.
573
+
574
+ .. autoclass:: torchvision.models.ResNet18_Weights
575
+ :members:
565
576
"""
566
577
weights = ResNet18_Weights .verify (weights )
567
578
@@ -570,12 +581,23 @@ def resnet18(*, weights: Optional[ResNet18_Weights] = None, progress: bool = Tru
570
581
571
582
@handle_legacy_interface (weights = ("pretrained" , ResNet34_Weights .IMAGENET1K_V1 ))
572
583
def resnet34 (* , weights : Optional [ResNet34_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> ResNet :
573
- r"""ResNet-34 model from
574
- `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_.
584
+ """ResNet-34 from `Deep Residual Learning for Image Recognition <https://arxiv.org/pdf/1512.03385.pdf>`__.
575
585
576
586
Args:
577
- weights (ResNet34_Weights, optional): The pretrained weights for the model
578
- progress (bool): If True, displays a progress bar of the download to stderr
587
+ weights (:class:`~torchvision.models.ResNet34_Weights`, optional): The
588
+ pretrained weights to use. See
589
+ :class:`~torchvision.models.ResNet34_Weights` below for
590
+ more details, and possible values. By default, no pre-trained
591
+ weights are used.
592
+ progress (bool, optional): If True, displays a progress bar of the
593
+ download to stderr. Default is True.
594
+ **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet``
595
+ base class. Please refer to the `source code
596
+ <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
597
+ for more details about this class.
598
+
599
+ .. autoclass:: torchvision.models.ResNet34_Weights
600
+ :members:
579
601
"""
580
602
weights = ResNet34_Weights .verify (weights )
581
603
@@ -584,12 +606,23 @@ def resnet34(*, weights: Optional[ResNet34_Weights] = None, progress: bool = Tru
584
606
585
607
@handle_legacy_interface (weights = ("pretrained" , ResNet50_Weights .IMAGENET1K_V1 ))
586
608
def resnet50 (* , weights : Optional [ResNet50_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> ResNet :
587
- r"""ResNet-50 model from
588
- `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_.
609
+ """ResNet-50 from `Deep Residual Learning for Image Recognition <https://arxiv.org/pdf/1512.03385.pdf>`__.
589
610
590
611
Args:
591
- weights (ResNet50_Weights, optional): The pretrained weights for the model
592
- progress (bool): If True, displays a progress bar of the download to stderr
612
+ weights (:class:`~torchvision.models.ResNet50_Weights`, optional): The
613
+ pretrained weights to use. See
614
+ :class:`~torchvision.models.ResNet50_Weights` below for
615
+ more details, and possible values. By default, no pre-trained
616
+ weights are used.
617
+ progress (bool, optional): If True, displays a progress bar of the
618
+ download to stderr. Default is True.
619
+ **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet``
620
+ base class. Please refer to the `source code
621
+ <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
622
+ for more details about this class.
623
+
624
+ .. autoclass:: torchvision.models.ResNet50_Weights
625
+ :members:
593
626
"""
594
627
weights = ResNet50_Weights .verify (weights )
595
628
@@ -598,12 +631,23 @@ def resnet50(*, weights: Optional[ResNet50_Weights] = None, progress: bool = Tru
598
631
599
632
@handle_legacy_interface (weights = ("pretrained" , ResNet101_Weights .IMAGENET1K_V1 ))
600
633
def resnet101 (* , weights : Optional [ResNet101_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> ResNet :
601
- r"""ResNet-101 model from
602
- `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_.
634
+ """ResNet-101 from `Deep Residual Learning for Image Recognition <https://arxiv.org/pdf/1512.03385.pdf>`__.
603
635
604
636
Args:
605
- weights (ResNet101_Weights, optional): The pretrained weights for the model
606
- progress (bool): If True, displays a progress bar of the download to stderr
637
+ weights (:class:`~torchvision.models.ResNet101_Weights`, optional): The
638
+ pretrained weights to use. See
639
+ :class:`~torchvision.models.ResNet101_Weights` below for
640
+ more details, and possible values. By default, no pre-trained
641
+ weights are used.
642
+ progress (bool, optional): If True, displays a progress bar of the
643
+ download to stderr. Default is True.
644
+ **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet``
645
+ base class. Please refer to the `source code
646
+ <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
647
+ for more details about this class.
648
+
649
+ .. autoclass:: torchvision.models.ResNet101_Weights
650
+ :members:
607
651
"""
608
652
weights = ResNet101_Weights .verify (weights )
609
653
@@ -612,12 +656,23 @@ def resnet101(*, weights: Optional[ResNet101_Weights] = None, progress: bool = T
612
656
613
657
@handle_legacy_interface (weights = ("pretrained" , ResNet152_Weights .IMAGENET1K_V1 ))
614
658
def resnet152 (* , weights : Optional [ResNet152_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> ResNet :
615
- r"""ResNet-152 model from
616
- `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_.
659
+ """ResNet-152 from `Deep Residual Learning for Image Recognition <https://arxiv.org/pdf/1512.03385.pdf>`__.
617
660
618
661
Args:
619
- weights (ResNet152_Weights, optional): The pretrained weights for the model
620
- progress (bool): If True, displays a progress bar of the download to stderr
662
+ weights (:class:`~torchvision.models.ResNet152_Weights`, optional): The
663
+ pretrained weights to use. See
664
+ :class:`~torchvision.models.ResNet152_Weights` below for
665
+ more details, and possible values. By default, no pre-trained
666
+ weights are used.
667
+ progress (bool, optional): If True, displays a progress bar of the
668
+ download to stderr. Default is True.
669
+ **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet``
670
+ base class. Please refer to the `source code
671
+ <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
672
+ for more details about this class.
673
+
674
+ .. autoclass:: torchvision.models.ResNet152_Weights
675
+ :members:
621
676
"""
622
677
weights = ResNet152_Weights .verify (weights )
623
678
0 commit comments