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
24 changes: 24 additions & 0 deletions docs/source/models/googlenet.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
GoogLeNet
=========

.. currentmodule:: torchvision.models

The GoogleNet model is based on the `Going Deeper with Convolutions <https://arxiv.org/abs/1409.4842>`__
paper.


Model builders
--------------

The following model builders can be used to instanciate a GoogLeNet model, with or
without pre-trained weights. All the model builders internally rely on the
``torchvision.models.googlenet.GoogLeNet`` base class. Please refer to the `source
code
<https://github.com/pytorch/vision/blob/main/torchvision/models/googlenet.py>`_ for
more details about this class.

.. autosummary::
:toctree: generated/
:template: function.rst

googlenet
1 change: 1 addition & 0 deletions docs/source/models_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ weights:
models/densenet
models/efficientnet
models/efficientnetv2
models/googlenet
models/regnet
models/resnet
models/resnext
Expand Down
21 changes: 14 additions & 7 deletions torchvision/models/googlenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,23 @@ class GoogLeNet_Weights(WeightsEnum):
@handle_legacy_interface(weights=("pretrained", GoogLeNet_Weights.IMAGENET1K_V1))
def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = True, **kwargs: Any) -> GoogLeNet:
r"""GoogLeNet (Inception v1) model architecture from
`"Going Deeper with Convolutions" <http://arxiv.org/abs/1409.4842>`_.
`Going Deeper with Convolutions <http://arxiv.org/abs/1409.4842>`_.
The required minimum input size of the model is 15x15.

Args:
weights (GoogLeNet_Weights, optional): The pretrained weights for the model
progress (bool): If True, displays a progress bar of the download to stderr
aux_logits (bool): If True, adds two auxiliary branches that can improve training.
Default: *False* when pretrained is True otherwise *True*
transform_input (bool): If True, preprocesses the input according to the method with which it
was trained on ImageNet. Default: True if ``weights=GoogLeNet_Weights.IMAGENET1K_V1``, else False.
weights (:class:`~torchvision.models.GoogLeNet_Weights`, optional): The
pretrained weights for the model. See
:class:`~torchvision.models.GoogLeNet_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.squeezenet.GoogLeNet``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/googlenet.py>`_
for more details about this class.
.. autoclass:: torchvision.models.GoogLeNet_Weights
:members:
"""
weights = GoogLeNet_Weights.verify(weights)

Expand Down