Skip to content

Commit 33a408a

Browse files
Add inception docs (#5924)
* Add inception * Fix googlenet bug * Fix bug add file * Update torchvision/models/inception.py Co-authored-by: Nicolas Hug <[email protected]>
1 parent 728ac51 commit 33a408a

File tree

5 files changed

+43
-10
lines changed

5 files changed

+43
-10
lines changed

docs/source/models.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ ConvNeXt
457457
convnext_large
458458

459459
SwinTransformer
460-
--------
460+
---------------
461461

462462
.. autosummary::
463463
:toctree: generated/

docs/source/models/inception.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Inception V3
2+
============
3+
4+
.. currentmodule:: torchvision.models
5+
6+
The EfficientNet model is based on the `Rethinking the Inception Architecture for Computer Vision <https://arxiv.org/abs/1512.00567>`__
7+
paper.
8+
9+
10+
Model builders
11+
--------------
12+
13+
The following model builders can be used to instanciate an InceptionV3 model, with or
14+
without pre-trained weights. All the model builders internally rely on the
15+
``torchvision.models.efficientnet.Inception3`` base class. Please refer to the `source
16+
code <https://github.com/pytorch/vision/blob/main/torchvision/models/inception.py>`_ for
17+
more details about this class.
18+
19+
.. autosummary::
20+
:toctree: generated/
21+
:template: function.rst
22+
23+
inception_v3

docs/source/models_new.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ weights:
4242
models/efficientnet
4343
models/efficientnetv2
4444
models/googlenet
45+
models/inception
4546
models/mobilenetv2
4647
models/mobilenetv3
4748
models/regnet

torchvision/models/googlenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = T
307307
weights are used.
308308
progress (bool, optional): If True, displays a progress bar of the
309309
download to stderr. Default is True.
310-
**kwargs: parameters passed to the ``torchvision.models.squeezenet.GoogLeNet``
310+
**kwargs: parameters passed to the ``torchvision.models.GoogLeNet``
311311
base class. Please refer to the `source code
312312
<https://github.com/pytorch/vision/blob/main/torchvision/models/googlenet.py>`_
313313
for more details about this class.

torchvision/models/inception.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -427,21 +427,30 @@ class Inception_V3_Weights(WeightsEnum):
427427

428428
@handle_legacy_interface(weights=("pretrained", Inception_V3_Weights.IMAGENET1K_V1))
429429
def inception_v3(*, weights: Optional[Inception_V3_Weights] = None, progress: bool = True, **kwargs: Any) -> Inception3:
430-
r"""Inception v3 model architecture from
431-
`"Rethinking the Inception Architecture for Computer Vision" <http://arxiv.org/abs/1512.00567>`_.
430+
"""
431+
Inception v3 model architecture from
432+
`Rethinking the Inception Architecture for Computer Vision <http://arxiv.org/abs/1512.00567>`_.
432433
The required minimum input size of the model is 75x75.
433434
434435
.. note::
435436
**Important**: In contrast to the other models the inception_v3 expects tensors with a size of
436437
N x 3 x 299 x 299, so ensure your images are sized accordingly.
437438
438439
Args:
439-
weights (Inception_V3_Weights, optional): The pretrained weights for the model
440-
progress (bool): If True, displays a progress bar of the download to stderr
441-
aux_logits (bool): If True, add an auxiliary branch that can improve training.
442-
Default: *True*
443-
transform_input (bool): If True, preprocesses the input according to the method with which it
444-
was trained on ImageNet. Default: True if ``weights=Inception_V3_Weights.IMAGENET1K_V1``, else False.
440+
weights (:class:`~torchvision.models.Inception_V3_Weights`, optional): The
441+
pretrained weights for the model. See
442+
:class:`~torchvision.models.Inception_V3_Weights` below for
443+
more details, and possible values. By default, no pre-trained
444+
weights are used.
445+
progress (bool, optional): If True, displays a progress bar of the
446+
download to stderr. Default is True.
447+
**kwargs: parameters passed to the ``torchvision.models.Inception3``
448+
base class. Please refer to the `source code
449+
<https://github.com/pytorch/vision/blob/main/torchvision/models/inception.py>`_
450+
for more details about this class.
451+
452+
.. autoclass:: torchvision.models.Inception_V3_Weights
453+
:members:
445454
"""
446455
weights = Inception_V3_Weights.verify(weights)
447456

0 commit comments

Comments
 (0)