Unverified Commit a945ec63 authored by Aditya Oke's avatar Aditya Oke Committed by GitHub
Browse files

Add revamped docs for Mobilenetv3 (#5908)



* Start adding

* Finish adding docs

* Fix other bugs

* Update torchvision/models/mobilenetv3.py

* Update torchvision/models/mobilenetv3.py
Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
parent f861003c
ConvNeXt ConvNeXt
====== ========
.. currentmodule:: torchvision.models .. currentmodule:: torchvision.models
......
MobileNet V3
============
.. currentmodule:: torchvision.models
The MobileNet V3 model is based on the `Searching for MobileNetV3 <https://arxiv.org/abs/1905.02244>`__ paper.
Model builders
--------------
The following model builders can be used to instantiate a MobileNetV3 model, with or
without pre-trained weights. All the model builders internally rely on the
``torchvision.models.mobilenetv3.MobileNetV3`` base class. Please refer to the `source
code
<https://github.com/pytorch/vision/blob/main/torchvision/models/mobilenetv3.py>`_ for
more details about this class.
.. autosummary::
:toctree: generated/
:template: function.rst
mobilenet_v3_large
mobilenet_v3_small
...@@ -43,6 +43,7 @@ weights: ...@@ -43,6 +43,7 @@ weights:
models/efficientnetv2 models/efficientnetv2
models/googlenet models/googlenet
models/mobilenetv2 models/mobilenetv2
models/mobilenetv3
models/regnet models/regnet
models/resnet models/resnet
models/resnext models/resnext
......
...@@ -362,11 +362,23 @@ def mobilenet_v3_large( ...@@ -362,11 +362,23 @@ def mobilenet_v3_large(
) -> MobileNetV3: ) -> MobileNetV3:
""" """
Constructs a large MobileNetV3 architecture from Constructs a large MobileNetV3 architecture from
`"Searching for MobileNetV3" <https://arxiv.org/abs/1905.02244>`_. `Searching for MobileNetV3 <https://arxiv.org/abs/1905.02244>`__.
Args: Args:
weights (MobileNet_V3_Large_Weights, optional): The pretrained weights for the model weights (:class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The
progress (bool): If True, displays a progress bar of the download to stderr pretrained weights to use. See
:class:`~torchvision.models.MobileNet_V3_Large_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.MobileNetV3``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/mobilenetv3.py>`_
for more details about this class.
.. autoclass:: torchvision.models.MobileNet_V3_Large_Weights
:members:
""" """
weights = MobileNet_V3_Large_Weights.verify(weights) weights = MobileNet_V3_Large_Weights.verify(weights)
...@@ -380,11 +392,23 @@ def mobilenet_v3_small( ...@@ -380,11 +392,23 @@ def mobilenet_v3_small(
) -> MobileNetV3: ) -> MobileNetV3:
""" """
Constructs a small MobileNetV3 architecture from Constructs a small MobileNetV3 architecture from
`"Searching for MobileNetV3" <https://arxiv.org/abs/1905.02244>`_. `Searching for MobileNetV3 <https://arxiv.org/abs/1905.02244>`__.
Args: Args:
weights (MobileNet_V3_Small_Weights, optional): The pretrained weights for the model weights (:class:`~torchvision.models.MobileNet_V3_Small_Weights`, optional): The
progress (bool): If True, displays a progress bar of the download to stderr pretrained weights to use. See
:class:`~torchvision.models.MobileNet_V3_Small_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.MobileNetV3``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/mobilenetv3.py>`_
for more details about this class.
.. autoclass:: torchvision.models.MobileNet_V3_Small_Weights
:members:
""" """
weights = MobileNet_V3_Small_Weights.verify(weights) weights = MobileNet_V3_Small_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