Skip to content

Commit 7e24a37

Browse files
jdsgomesNicolasHug
authored andcommitted
[fbsync] Remove references to non-existing weights in MNASNET (#5936)
Summary: * Remove references to non-existing weights * Update torchvision/models/mnasnet.py * Update torchvision/models/mnasnet.py * apply ufmt Reviewed By: YosuaMichael Differential Revision: D36204390 fbshipit-source-id: b2d978b52f83e414079f79489a10447df4c77feb Co-authored-by: Nicolas Hug <[email protected]> Co-authored-by: Nicolas Hug <[email protected]> Co-authored-by: Nicolas Hug <[email protected]>
1 parent e87e6e4 commit 7e24a37

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

docs/source/models/mnasnet.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ Search for Mobile <https://arxiv.org/pdf/1807.11626.pdf>`__ paper.
1111
Model builders
1212
--------------
1313

14-
The following model builders can be used to instanciate an MNASNet model, with or
15-
without pre-trained weights. All the model builders internally rely on the
14+
The following model builders can be used to instanciate an MNASNet model. Currently
15+
only ``mnasnet0_5`` and ``mnasnet1_0`` can be instantiated with pre-trained weights.
16+
All the model builders internally rely on the
1617
``torchvision.models.mnasnet.MNASNet`` base class. Please refer to the `source
1718
code
1819
<https://github.com/pytorch/vision/blob/main/torchvision/models/mnasnet.py>`_ for

torchvision/models/mnasnet.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,8 @@ def mnasnet0_75(*, weights: Optional[MNASNet0_75_Weights] = None, progress: bool
306306
<https://arxiv.org/pdf/1807.11626.pdf>`_ paper.
307307
308308
Args:
309-
weights (:class:`~torchvision.models.MNASNet0_75_Weights`, optional): The
310-
pretrained weights to use. See
311-
:class:`~torchvision.models.MNASNet0_75_Weights` below for
312-
more details, and possible values. By default, no pre-trained
309+
weights (:class:`~torchvision.models.MNASNet0_75_Weights`, optional): Currently
310+
no pre-trained weights are available and by default no pre-trained
313311
weights are used.
314312
progress (bool, optional): If True, displays a progress bar of the
315313
download to stderr. Default is True.
@@ -358,10 +356,8 @@ def mnasnet1_3(*, weights: Optional[MNASNet1_3_Weights] = None, progress: bool =
358356
<https://arxiv.org/pdf/1807.11626.pdf>`_ paper.
359357
360358
Args:
361-
weights (:class:`~torchvision.models.MNASNet1_3_Weights`, optional): The
362-
pretrained weights to use. See
363-
:class:`~torchvision.models.MNASNet1_3_Weights` below for
364-
more details, and possible values. By default, no pre-trained
359+
weights (:class:`~torchvision.models.MNASNet1_3_Weights`, optional): Currently
360+
no pre-trained weights are available and by default no pre-trained
365361
weights are used.
366362
progress (bool, optional): If True, displays a progress bar of the
367363
download to stderr. Default is True.

0 commit comments

Comments
 (0)