Skip to content

Commit a8f563d

Browse files
author
Yassine Alouini
authored
Add revamped docs for googlenet (#5885)
1 parent d425f00 commit a8f563d

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

docs/source/models/googlenet.rst

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

docs/source/models_new.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ weights:
4040
models/densenet
4141
models/efficientnet
4242
models/efficientnetv2
43+
models/googlenet
4344
models/regnet
4445
models/resnet
4546
models/resnext

torchvision/models/googlenet.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,16 +296,23 @@ class GoogLeNet_Weights(WeightsEnum):
296296
@handle_legacy_interface(weights=("pretrained", GoogLeNet_Weights.IMAGENET1K_V1))
297297
def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = True, **kwargs: Any) -> GoogLeNet:
298298
r"""GoogLeNet (Inception v1) model architecture from
299-
`"Going Deeper with Convolutions" <http://arxiv.org/abs/1409.4842>`_.
299+
`Going Deeper with Convolutions <http://arxiv.org/abs/1409.4842>`_.
300300
The required minimum input size of the model is 15x15.
301301
302302
Args:
303-
weights (GoogLeNet_Weights, optional): The pretrained weights for the model
304-
progress (bool): If True, displays a progress bar of the download to stderr
305-
aux_logits (bool): If True, adds two auxiliary branches that can improve training.
306-
Default: *False* when pretrained is True otherwise *True*
307-
transform_input (bool): If True, preprocesses the input according to the method with which it
308-
was trained on ImageNet. Default: True if ``weights=GoogLeNet_Weights.IMAGENET1K_V1``, else False.
303+
weights (:class:`~torchvision.models.GoogLeNet_Weights`, optional): The
304+
pretrained weights for the model. See
305+
:class:`~torchvision.models.GoogLeNet_Weights` below for
306+
more details, and possible values. By default, no pre-trained
307+
weights are used.
308+
progress (bool, optional): If True, displays a progress bar of the
309+
download to stderr. Default is True.
310+
**kwargs: parameters passed to the ``torchvision.models.squeezenet.GoogLeNet``
311+
base class. Please refer to the `source code
312+
<https://github.com/pytorch/vision/blob/main/torchvision/models/googlenet.py>`_
313+
for more details about this class.
314+
.. autoclass:: torchvision.models.GoogLeNet_Weights
315+
:members:
309316
"""
310317
weights = GoogLeNet_Weights.verify(weights)
311318

0 commit comments

Comments
 (0)