Unverified Commit a8f563db authored by Yassine Alouini's avatar Yassine Alouini Committed by GitHub
Browse files

Add revamped docs for googlenet (#5885)

parent d425f007
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
...@@ -40,6 +40,7 @@ weights: ...@@ -40,6 +40,7 @@ weights:
models/densenet models/densenet
models/efficientnet models/efficientnet
models/efficientnetv2 models/efficientnetv2
models/googlenet
models/regnet models/regnet
models/resnet models/resnet
models/resnext models/resnext
......
...@@ -296,16 +296,23 @@ class GoogLeNet_Weights(WeightsEnum): ...@@ -296,16 +296,23 @@ class GoogLeNet_Weights(WeightsEnum):
@handle_legacy_interface(weights=("pretrained", GoogLeNet_Weights.IMAGENET1K_V1)) @handle_legacy_interface(weights=("pretrained", GoogLeNet_Weights.IMAGENET1K_V1))
def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = True, **kwargs: Any) -> GoogLeNet: def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = True, **kwargs: Any) -> GoogLeNet:
r"""GoogLeNet (Inception v1) model architecture from 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. The required minimum input size of the model is 15x15.
Args: Args:
weights (GoogLeNet_Weights, optional): The pretrained weights for the model weights (:class:`~torchvision.models.GoogLeNet_Weights`, optional): The
progress (bool): If True, displays a progress bar of the download to stderr pretrained weights for the model. See
aux_logits (bool): If True, adds two auxiliary branches that can improve training. :class:`~torchvision.models.GoogLeNet_Weights` below for
Default: *False* when pretrained is True otherwise *True* more details, and possible values. By default, no pre-trained
transform_input (bool): If True, preprocesses the input according to the method with which it weights are used.
was trained on ImageNet. Default: True if ``weights=GoogLeNet_Weights.IMAGENET1K_V1``, else False. 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) weights = GoogLeNet_Weights.verify(weights)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment