@@ -490,11 +490,20 @@ class ViT_H_14_Weights(WeightsEnum):
490
490
def vit_b_16 (* , weights : Optional [ViT_B_16_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
491
491
"""
492
492
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>`_.
494
494
495
495
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:
498
507
"""
499
508
weights = ViT_B_16_Weights .verify (weights )
500
509
@@ -514,11 +523,20 @@ def vit_b_16(*, weights: Optional[ViT_B_16_Weights] = None, progress: bool = Tru
514
523
def vit_b_32 (* , weights : Optional [ViT_B_32_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
515
524
"""
516
525
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>`_.
518
527
519
528
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:
522
540
"""
523
541
weights = ViT_B_32_Weights .verify (weights )
524
542
@@ -538,11 +556,20 @@ def vit_b_32(*, weights: Optional[ViT_B_32_Weights] = None, progress: bool = Tru
538
556
def vit_l_16 (* , weights : Optional [ViT_L_16_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
539
557
"""
540
558
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>`_.
542
560
543
561
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:
546
573
"""
547
574
weights = ViT_L_16_Weights .verify (weights )
548
575
@@ -562,11 +589,20 @@ def vit_l_16(*, weights: Optional[ViT_L_16_Weights] = None, progress: bool = Tru
562
589
def vit_l_32 (* , weights : Optional [ViT_L_32_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
563
590
"""
564
591
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>`_.
566
593
567
594
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:
570
606
"""
571
607
weights = ViT_L_32_Weights .verify (weights )
572
608
@@ -585,11 +621,20 @@ def vit_l_32(*, weights: Optional[ViT_L_32_Weights] = None, progress: bool = Tru
585
621
def vit_h_14 (* , weights : Optional [ViT_H_14_Weights ] = None , progress : bool = True , ** kwargs : Any ) -> VisionTransformer :
586
622
"""
587
623
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>`_.
589
625
590
626
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:
593
638
"""
594
639
weights = ViT_H_14_Weights .verify (weights )
595
640
0 commit comments