@@ -556,12 +556,23 @@ class Wide_ResNet101_2_Weights(WeightsEnum):
556556
557557@handle_legacy_interface (weights = ("pretrained" , ResNet18_Weights .IMAGENET1K_V1 ))
558558def 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>`__.
561560
562561 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:
565576 """
566577 weights = ResNet18_Weights .verify (weights )
567578
@@ -570,12 +581,23 @@ def resnet18(*, weights: Optional[ResNet18_Weights] = None, progress: bool = Tru
570581
571582@handle_legacy_interface (weights = ("pretrained" , ResNet34_Weights .IMAGENET1K_V1 ))
572583def 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>`__.
575585
576586 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:
579601 """
580602 weights = ResNet34_Weights .verify (weights )
581603
@@ -584,12 +606,23 @@ def resnet34(*, weights: Optional[ResNet34_Weights] = None, progress: bool = Tru
584606
585607@handle_legacy_interface (weights = ("pretrained" , ResNet50_Weights .IMAGENET1K_V1 ))
586608def 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>`__.
589610
590611 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:
593626 """
594627 weights = ResNet50_Weights .verify (weights )
595628
@@ -598,12 +631,23 @@ def resnet50(*, weights: Optional[ResNet50_Weights] = None, progress: bool = Tru
598631
599632@handle_legacy_interface (weights = ("pretrained" , ResNet101_Weights .IMAGENET1K_V1 ))
600633def 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>`__.
603635
604636 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:
607651 """
608652 weights = ResNet101_Weights .verify (weights )
609653
@@ -612,12 +656,23 @@ def resnet101(*, weights: Optional[ResNet101_Weights] = None, progress: bool = T
612656
613657@handle_legacy_interface (weights = ("pretrained" , ResNet152_Weights .IMAGENET1K_V1 ))
614658def 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>`__.
617660
618661 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:
621676 """
622677 weights = ResNet152_Weights .verify (weights )
623678
0 commit comments