Skip to content

Commit

Permalink
Fix ViT and Resnext docs (pytorch#6150) (pytorch#6151)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Jun 10, 2022
1 parent 072aa71 commit 685b689
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions docs/source/models/resnext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ more details about this class.

resnext50_32x4d
resnext101_32x8d
resnext101_64x4d
30 changes: 15 additions & 15 deletions torchvision/models/vision_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,16 +603,16 @@ def vit_b_16(*, weights: Optional[ViT_B_16_Weights] = None, progress: bool = Tru
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
Args:
weights (:class:`~torchvision.models.vision_transformer.ViT_B_16_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.vision_transformer.ViT_B_16_Weights`
weights (:class:`~torchvision.models.ViT_B_16_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.ViT_B_16_Weights`
below for more details and possible values. By default, no pre-trained weights are used.
progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
**kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
for more details about this class.
.. autoclass:: torchvision.models.vision_transformer.ViT_B_16_Weights
.. autoclass:: torchvision.models.ViT_B_16_Weights
:members:
"""
weights = ViT_B_16_Weights.verify(weights)
Expand All @@ -636,16 +636,16 @@ def vit_b_32(*, weights: Optional[ViT_B_32_Weights] = None, progress: bool = Tru
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
Args:
weights (:class:`~torchvision.models.vision_transformer.ViT_B_32_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.vision_transformer.ViT_B_32_Weights`
weights (:class:`~torchvision.models.ViT_B_32_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.ViT_B_32_Weights`
below for more details and possible values. By default, no pre-trained weights are used.
progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
**kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
for more details about this class.
.. autoclass:: torchvision.models.vision_transformer.ViT_B_32_Weights
.. autoclass:: torchvision.models.ViT_B_32_Weights
:members:
"""
weights = ViT_B_32_Weights.verify(weights)
Expand All @@ -669,16 +669,16 @@ def vit_l_16(*, weights: Optional[ViT_L_16_Weights] = None, progress: bool = Tru
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
Args:
weights (:class:`~torchvision.models.vision_transformer.ViT_L_16_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.vision_transformer.ViT_L_16_Weights`
weights (:class:`~torchvision.models.ViT_L_16_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.ViT_L_16_Weights`
below for more details and possible values. By default, no pre-trained weights are used.
progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
**kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
for more details about this class.
.. autoclass:: torchvision.models.vision_transformer.ViT_L_16_Weights
.. autoclass:: torchvision.models.ViT_L_16_Weights
:members:
"""
weights = ViT_L_16_Weights.verify(weights)
Expand All @@ -702,16 +702,16 @@ def vit_l_32(*, weights: Optional[ViT_L_32_Weights] = None, progress: bool = Tru
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
Args:
weights (:class:`~torchvision.models.vision_transformer.ViT_L_32_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.vision_transformer.ViT_L_32_Weights`
weights (:class:`~torchvision.models.ViT_L_32_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.ViT_L_32_Weights`
below for more details and possible values. By default, no pre-trained weights are used.
progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
**kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
for more details about this class.
.. autoclass:: torchvision.models.vision_transformer.ViT_L_32_Weights
.. autoclass:: torchvision.models.ViT_L_32_Weights
:members:
"""
weights = ViT_L_32_Weights.verify(weights)
Expand All @@ -734,16 +734,16 @@ def vit_h_14(*, weights: Optional[ViT_H_14_Weights] = None, progress: bool = Tru
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>`_.
Args:
weights (:class:`~torchvision.models.vision_transformer.ViT_H_14_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.vision_transformer.ViT_H_14_Weights`
weights (:class:`~torchvision.models.ViT_H_14_Weights`, optional): The pretrained
weights to use. See :class:`~torchvision.models.ViT_H_14_Weights`
below for more details and possible values. By default, no pre-trained weights are used.
progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True.
**kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/vision_transformer.py>`_
for more details about this class.
.. autoclass:: torchvision.models.vision_transformer.ViT_H_14_Weights
.. autoclass:: torchvision.models.ViT_H_14_Weights
:members:
"""
weights = ViT_H_14_Weights.verify(weights)
Expand Down

0 comments on commit 685b689

Please sign in to comment.