"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "4a76e5d49b290f39d4df70b777ea70c523db5fc2"
Unverified Commit 33a408aa authored by Aditya Oke's avatar Aditya Oke Committed by GitHub
Browse files

Add inception docs (#5924)



* Add inception

* Fix googlenet bug

* Fix bug add file

* Update torchvision/models/inception.py
Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
parent 728ac510
...@@ -457,7 +457,7 @@ ConvNeXt ...@@ -457,7 +457,7 @@ ConvNeXt
convnext_large convnext_large
SwinTransformer SwinTransformer
-------- ---------------
.. autosummary:: .. autosummary::
:toctree: generated/ :toctree: generated/
......
Inception V3
============
.. currentmodule:: torchvision.models
The EfficientNet model is based on the `Rethinking the Inception Architecture for Computer Vision <https://arxiv.org/abs/1512.00567>`__
paper.
Model builders
--------------
The following model builders can be used to instanciate an InceptionV3 model, with or
without pre-trained weights. All the model builders internally rely on the
``torchvision.models.efficientnet.Inception3`` base class. Please refer to the `source
code <https://github.com/pytorch/vision/blob/main/torchvision/models/inception.py>`_ for
more details about this class.
.. autosummary::
:toctree: generated/
:template: function.rst
inception_v3
...@@ -42,6 +42,7 @@ weights: ...@@ -42,6 +42,7 @@ weights:
models/efficientnet models/efficientnet
models/efficientnetv2 models/efficientnetv2
models/googlenet models/googlenet
models/inception
models/mobilenetv2 models/mobilenetv2
models/mobilenetv3 models/mobilenetv3
models/regnet models/regnet
......
...@@ -307,7 +307,7 @@ def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = T ...@@ -307,7 +307,7 @@ def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = T
weights are used. weights are used.
progress (bool, optional): If True, displays a progress bar of the progress (bool, optional): If True, displays a progress bar of the
download to stderr. Default is True. download to stderr. Default is True.
**kwargs: parameters passed to the ``torchvision.models.squeezenet.GoogLeNet`` **kwargs: parameters passed to the ``torchvision.models.GoogLeNet``
base class. Please refer to the `source code base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/googlenet.py>`_ <https://github.com/pytorch/vision/blob/main/torchvision/models/googlenet.py>`_
for more details about this class. for more details about this class.
......
...@@ -427,8 +427,9 @@ class Inception_V3_Weights(WeightsEnum): ...@@ -427,8 +427,9 @@ class Inception_V3_Weights(WeightsEnum):
@handle_legacy_interface(weights=("pretrained", Inception_V3_Weights.IMAGENET1K_V1)) @handle_legacy_interface(weights=("pretrained", Inception_V3_Weights.IMAGENET1K_V1))
def inception_v3(*, weights: Optional[Inception_V3_Weights] = None, progress: bool = True, **kwargs: Any) -> Inception3: def inception_v3(*, weights: Optional[Inception_V3_Weights] = None, progress: bool = True, **kwargs: Any) -> Inception3:
r"""Inception v3 model architecture from """
`"Rethinking the Inception Architecture for Computer Vision" <http://arxiv.org/abs/1512.00567>`_. Inception v3 model architecture from
`Rethinking the Inception Architecture for Computer Vision <http://arxiv.org/abs/1512.00567>`_.
The required minimum input size of the model is 75x75. The required minimum input size of the model is 75x75.
.. note:: .. note::
...@@ -436,12 +437,20 @@ def inception_v3(*, weights: Optional[Inception_V3_Weights] = None, progress: bo ...@@ -436,12 +437,20 @@ def inception_v3(*, weights: Optional[Inception_V3_Weights] = None, progress: bo
N x 3 x 299 x 299, so ensure your images are sized accordingly. N x 3 x 299 x 299, so ensure your images are sized accordingly.
Args: Args:
weights (Inception_V3_Weights, optional): The pretrained weights for the model weights (:class:`~torchvision.models.Inception_V3_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, add an auxiliary branch that can improve training. :class:`~torchvision.models.Inception_V3_Weights` below for
Default: *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=Inception_V3_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.Inception3``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/inception.py>`_
for more details about this class.
.. autoclass:: torchvision.models.Inception_V3_Weights
:members:
""" """
weights = Inception_V3_Weights.verify(weights) weights = Inception_V3_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