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

[DOC] Add quantized inception updated documentation. (#6005)



* [DOC] Add quantized inception updated documentation.

* Add missing file.

* Apply suggestions from code review

[ENH] Improve doc thanks to various code review comments.
Co-authored-by: default avatarAditya Oke <47158509+oke-aditya@users.noreply.github.com>
Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
Co-authored-by: default avatarAditya Oke <47158509+oke-aditya@users.noreply.github.com>
Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
parent 8edd920d
Quantized InceptionV3
=====================
.. currentmodule:: torchvision.models.quantization
The Quantized Inception 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 a quantized Inception
model, with or without pre-trained weights. All the model builders internally
rely on the ``torchvision.models.quantization.inception.QuantizableInception3``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/quantization/inception.py>`_
for more details about this class.
.. autosummary::
:toctree: generated/
:template: function.rst
inception_v3
......@@ -147,6 +147,7 @@ pre-trained weights:
:maxdepth: 1
models/googlenet_quant
models/inception_quant
models/mobilenetv2_quant
|
......
......@@ -208,7 +208,7 @@ def inception_v3(
**kwargs: Any,
) -> QuantizableInception3:
r"""Inception v3 model architecture from
`"Rethinking the Inception Architecture for Computer Vision" <http://arxiv.org/abs/1512.00567>`_.
`Rethinking the Inception Architecture for Computer Vision <http://arxiv.org/abs/1512.00567>`__.
.. note::
**Important**: In contrast to the other models the inception_v3 expects tensors with a size of
......@@ -219,10 +219,26 @@ def inception_v3(
GPU inference is not yet supported
Args:
weights (Inception_V3_QuantizedWeights or Inception_V3_Weights, optional): The pretrained
weights for the model
progress (bool): If True, displays a progress bar of the download to stderr
quantize (bool): If True, return a quantized version of the model
weights (:class:`~torchvision.models.quantization.Inception_V3_QuantizedWeights` or :class:`~torchvision.models.Inception_V3_Weights`, optional): The pretrained
weights for the model. See
:class:`~torchvision.models.quantization.Inception_V3_QuantizedWeights` 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.
quantize (bool, optional): If True, return a quantized version of the model.
Default is False.
**kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableInception3``
base class. Please refer to the `source code
<https://github.com/pytorch/vision/blob/main/torchvision/models/quantization/inception.py>`_
for more details about this class.
.. autoclass:: torchvision.models.quantization.Inception_V3_QuantizedWeights
:members:
.. autoclass:: torchvision.models.Inception_V3_Weights
:members:
:noindex:
"""
weights = (Inception_V3_QuantizedWeights if quantize else 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