Unverified Commit f861003c authored by Abhijit Deo's avatar Abhijit Deo Committed by GitHub
Browse files

revamp docs for Wide ResNet (#5907)



* init

* minor change

* typo
Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
parent 29211740
......@@ -10,7 +10,7 @@ paper.
Model builders
--------------
The following model builders can be used to instantiate an ResNext model, with or
The following model builders can be used to instantiate a ResNext model, with or
without pre-trained weights. All the model builders internally rely on the
``torchvision.models.resnet.ResNet`` base class. Please refer to the `source
code
......
Wide ResNet
===========
.. currentmodule:: torchvision.models
The Wide ResNet model is based on the `Wide Residual Networks <https://arxiv.org/abs/1605.07146>`__
paper.
Model builders
--------------
The following model builders can be used to instantiate a Wide ResNet model, with or
without pre-trained weights. All the model builders internally rely on the
``torchvision.models.resnet.ResNet`` base class. Please refer to the `source
code
<https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_ for
more details about this class.
.. autosummary::
:toctree: generated/
:template: function.rst
wide_resnet50_2
wide_resnet101_2
......@@ -50,6 +50,7 @@ weights:
models/swin_transformer
models/vgg
models/vision_transformer
models/wide_resnet
Table of all available classification weights
......
......@@ -738,8 +738,8 @@ def resnext101_32x8d(
def wide_resnet50_2(
*, weights: Optional[Wide_ResNet50_2_Weights] = None, progress: bool = True, **kwargs: Any
) -> ResNet:
r"""Wide ResNet-50-2 model from
`"Wide Residual Networks" <https://arxiv.org/pdf/1605.07146.pdf>`_.
"""Wide ResNet-50-2 model from
`Wide Residual Networks <https://arxiv.org/abs/1605.07146>`_.
The model is the same as ResNet except for the bottleneck number of channels
which is twice larger in every block. The number of channels in outer 1x1
......@@ -747,8 +747,19 @@ def wide_resnet50_2(
channels, and in Wide ResNet-50-2 has 2048-1024-2048.
Args:
weights (Wide_ResNet50_2_Weights, optional): The pretrained weights for the model
progress (bool): If True, displays a progress bar of the download to stderr
weights (:class:`~torchvision.models.Wide_ResNet50_2_Weights`, optional): The
pretrained weights to use. See
:class:`~torchvision.models.Wide_ResNet50_2_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.resnet.ResNet``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
for more details about this class.
.. autoclass:: torchvision.models.Wide_ResNet50_2_Weights
:members:
"""
weights = Wide_ResNet50_2_Weights.verify(weights)
......@@ -760,8 +771,8 @@ def wide_resnet50_2(
def wide_resnet101_2(
*, weights: Optional[Wide_ResNet101_2_Weights] = None, progress: bool = True, **kwargs: Any
) -> ResNet:
r"""Wide ResNet-101-2 model from
`"Wide Residual Networks" <https://arxiv.org/pdf/1605.07146.pdf>`_.
"""Wide ResNet-101-2 model from
`Wide Residual Networks <https://arxiv.org/abs/1605.07146>`_.
The model is the same as ResNet except for the bottleneck number of channels
which is twice larger in every block. The number of channels in outer 1x1
......@@ -769,8 +780,19 @@ def wide_resnet101_2(
channels, and in Wide ResNet-50-2 has 2048-1024-2048.
Args:
weights (Wide_ResNet101_2_Weights, optional): The pretrained weights for the model
progress (bool): If True, displays a progress bar of the download to stderr
weights (:class:`~torchvision.models.Wide_ResNet101_2_Weights`, optional): The
pretrained weights to use. See
:class:`~torchvision.models.Wide_ResNet101_2_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.resnet.ResNet``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_
for more details about this class.
.. autoclass:: torchvision.models.Wide_ResNet101_2_Weights
:members:
"""
weights = Wide_ResNet101_2_Weights.verify(weights)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment