Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/models/convnext.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ConvNeXt
======
========

.. currentmodule:: torchvision.models

Expand Down
24 changes: 24 additions & 0 deletions docs/source/models/mobilenetv3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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
1 change: 1 addition & 0 deletions docs/source/models_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ weights:
models/efficientnetv2
models/googlenet
models/mobilenetv2
models/mobilenetv3
models/regnet
models/resnet
models/resnext
Expand Down
36 changes: 30 additions & 6 deletions torchvision/models/mobilenetv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,23 @@ def mobilenet_v3_large(
) -> MobileNetV3:
"""
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:
weights (MobileNet_V3_Large_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.MobileNet_V3_Large_Weights`, optional): The
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)

Expand All @@ -380,11 +392,23 @@ def mobilenet_v3_small(
) -> MobileNetV3:
"""
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:
weights (MobileNet_V3_Small_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.MobileNet_V3_Small_Weights`, optional): The
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)

Expand Down