Skip to content

Commit 728ac51

Browse files
Add lraspp docs (#5923)
* add docs * Small fix * Update docs/source/models/lraspp.rst Co-authored-by: Nicolas Hug <[email protected]>
1 parent 2942bfa commit 728ac51

File tree

3 files changed

+43
-6
lines changed

3 files changed

+43
-6
lines changed

docs/source/models/lraspp.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
LRASPP
2+
======
3+
4+
.. currentmodule:: torchvision.models.segmentation
5+
6+
The LRASPP model is based on the `Searching for MobileNetV3 <https://arxiv.org/abs/1905.02244>`_ paper.
7+
8+
Model builders
9+
--------------
10+
11+
The following model builders can be used to instantiate a FCN model, with or
12+
without pre-trained weights. All the model builders internally rely on the
13+
``torchvision.models.segmentation.LRASPP`` base class. Please refer to the `source
14+
code
15+
<https://github.com/pytorch/vision/blob/main/torchvision/models/segmentation/lraspp.py>`_ for
16+
more details about this class.
17+
18+
.. autosummary::
19+
:toctree: generated/
20+
:template: function.rst
21+
22+
lraspp_mobilenet_v3_large

docs/source/models_new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pre-trained weights:
7474

7575
models/deeplabv3
7676
models/fcn
77-
77+
models/lraspp
7878

7979
Table of all available semantic segmentation weights
8080
----------------------------------------------------

torchvision/models/segmentation/lraspp.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,28 @@ def lraspp_mobilenet_v3_large(
123123
weights_backbone: Optional[MobileNet_V3_Large_Weights] = MobileNet_V3_Large_Weights.IMAGENET1K_V1,
124124
**kwargs: Any,
125125
) -> LRASPP:
126-
"""Constructs a Lite R-ASPP Network model with a MobileNetV3-Large backbone.
126+
"""Constructs a Lite R-ASPP Network model with a MobileNetV3-Large backbone from
127+
`Searching for MobileNetV3 <https://arxiv.org/abs/1905.02244>`_ paper.
127128
128129
Args:
129-
weights (LRASPP_MobileNet_V3_Large_Weights, optional): The pretrained weights for the model
130-
progress (bool): If True, displays a progress bar of the download to stderr
131-
num_classes (int, optional): number of output classes of the model (including the background)
132-
weights_backbone (MobileNet_V3_Large_Weights, optional): The pretrained weights for the backbone
130+
weights (:class:`~torchvision.models.segmentation.LRASPP_MobileNet_V3_Large_Weights`, optional): The
131+
pretrained weights to use. See
132+
:class:`~torchvision.models.segmentation.LRASPP_MobileNet_V3_Large_Weights` below for
133+
more details, and possible values. By default, no pre-trained
134+
weights are used.
135+
progress (bool, optional): If True, displays a progress bar of the
136+
download to stderr. Default is True.
137+
num_classes (int, optional): number of output classes of the model (including the background).
138+
aux_loss (bool, optional): If True, it uses an auxiliary loss.
139+
weights_backbone (:class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The pretrained
140+
weights for the backbone.
141+
**kwargs: parameters passed to the ``torchvision.models.segmentation.LRASPP``
142+
base class. Please refer to the `source code
143+
<https://github.com/pytorch/vision/blob/main/torchvision/models/segmentation/lraspp.py>`_
144+
for more details about this class.
145+
146+
.. autoclass:: torchvision.models.segmentation.LRASPP_MobileNet_V3_Large_Weights
147+
:members:
133148
"""
134149
if kwargs.pop("aux_loss", False):
135150
raise NotImplementedError("This model does not use auxiliary loss")

0 commit comments

Comments
 (0)