@@ -490,11 +490,20 @@ class ViT_H_14_Weights(WeightsEnum):
490490def vit_b_16 (* , weights : Optional [ViT_B_16_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
491491 """
492492 Constructs a vit_b_16 architecture from
493- `" An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale" <https://arxiv.org/abs/2010.11929>`_.
493+ `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
494494
495495 Args:
496- weights (ViT_B_16_Weights, optional): The pretrained weights for the model
497- progress (bool): If True, displays a progress bar of the download to stderr
496+ weights (:class:`~torchvision.models.vision_transformer.ViT_B_16_Weights`, optional): The pretrained
497+ weights to use. See :class:`~torchvision.models.vision_transformer.ViT_B_16_Weights`
498+ below for more details and possible values. By default, no pre-trained weights are used.
499+ progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
500+ **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
501+ base class. Please refer to the `source code
502+ <https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
503+ for more details about this class.
504+
505+ .. autoclass:: torchvision.models.vision_transformer.ViT_B_16_Weights
506+ :members:
498507 """
499508 weights = ViT_B_16_Weights .verify (weights )
500509
@@ -514,11 +523,20 @@ def vit_b_16(*, weights: Optional[ViT_B_16_Weights] = None, progress: bool = Tru
514523def vit_b_32 (* , weights : Optional [ViT_B_32_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
515524 """
516525 Constructs a vit_b_32 architecture from
517- `" An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale" <https://arxiv.org/abs/2010.11929>`_.
526+ `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
518527
519528 Args:
520- weights (ViT_B_32_Weights, optional): The pretrained weights for the model
521- progress (bool): If True, displays a progress bar of the download to stderr
529+ weights (:class:`~torchvision.models.vision_transformer.ViT_B_32_Weights`, optional): The pretrained
530+ weights to use. See :class:`~torchvision.models.vision_transformer.ViT_B_32_Weights`
531+ below for more details and possible values. By default, no pre-trained weights are used.
532+ progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
533+ **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
534+ base class. Please refer to the `source code
535+ <https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
536+ for more details about this class.
537+
538+ .. autoclass:: torchvision.models.vision_transformer.ViT_B_32_Weights
539+ :members:
522540 """
523541 weights = ViT_B_32_Weights .verify (weights )
524542
@@ -538,11 +556,20 @@ def vit_b_32(*, weights: Optional[ViT_B_32_Weights] = None, progress: bool = Tru
538556def vit_l_16 (* , weights : Optional [ViT_L_16_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
539557 """
540558 Constructs a vit_l_16 architecture from
541- `" An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale" <https://arxiv.org/abs/2010.11929>`_.
559+ `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
542560
543561 Args:
544- weights (ViT_L_16_Weights, optional): The pretrained weights for the model
545- progress (bool): If True, displays a progress bar of the download to stderr
562+ weights (:class:`~torchvision.models.vision_transformer.ViT_L_16_Weights`, optional): The pretrained
563+ weights to use. See :class:`~torchvision.models.vision_transformer.ViT_L_16_Weights`
564+ below for more details and possible values. By default, no pre-trained weights are used.
565+ progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
566+ **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
567+ base class. Please refer to the `source code
568+ <https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
569+ for more details about this class.
570+
571+ .. autoclass:: torchvision.models.vision_transformer.ViT_L_16_Weights
572+ :members:
546573 """
547574 weights = ViT_L_16_Weights .verify (weights )
548575
@@ -562,11 +589,20 @@ def vit_l_16(*, weights: Optional[ViT_L_16_Weights] = None, progress: bool = Tru
562589def vit_l_32 (* , weights : Optional [ViT_L_32_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
563590 """
564591 Constructs a vit_l_32 architecture from
565- `" An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale" <https://arxiv.org/abs/2010.11929>`_.
592+ `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
566593
567594 Args:
568- weights (ViT_L_32_Weights, optional): The pretrained weights for the model
569- progress (bool): If True, displays a progress bar of the download to stderr
595+ weights (:class:`~torchvision.models.vision_transformer.ViT_L_32_Weights`, optional): The pretrained
596+ weights to use. See :class:`~torchvision.models.vision_transformer.ViT_L_32_Weights`
597+ below for more details and possible values. By default, no pre-trained weights are used.
598+ progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
599+ **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
600+ base class. Please refer to the `source code
601+ <https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
602+ for more details about this class.
603+
604+ .. autoclass:: torchvision.models.vision_transformer.ViT_L_32_Weights
605+ :members:
570606 """
571607 weights = ViT_L_32_Weights .verify (weights )
572608
@@ -585,11 +621,20 @@ def vit_l_32(*, weights: Optional[ViT_L_32_Weights] = None, progress: bool = Tru
585621def vit_h_14 (* , weights : Optional [ViT_H_14_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
586622 """
587623 Constructs a vit_h_14 architecture from
588- `" An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale" <https://arxiv.org/abs/2010.11929>`_.
624+ `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
589625
590626 Args:
591- weights (ViT_H_14_Weights, optional): The pretrained weights for the model
592- progress (bool): If True, displays a progress bar of the download to stderr
627+ weights (:class:`~torchvision.models.vision_transformer.ViT_H_14_Weights`, optional): The pretrained
628+ weights to use. See :class:`~torchvision.models.vision_transformer.ViT_H_14_Weights`
629+ below for more details and possible values. By default, no pre-trained weights are used.
630+ progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
631+ **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
632+ base class. Please refer to the `source code
633+ <https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
634+ for more details about this class.
635+
636+ .. autoclass:: torchvision.models.vision_transformer.ViT_H_14_Weights
637+ :members:
593638 """
594639 weights = ViT_H_14_Weights .verify (weights )
595640
0 commit comments