Skip to content

Commit e7abd3b

Browse files
Yassine Alouinioke-adityaNicolasHug
authored
[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: Aditya Oke <[email protected]> Co-authored-by: Nicolas Hug <[email protected]> Co-authored-by: Aditya Oke <[email protected]> Co-authored-by: Nicolas Hug <[email protected]>
1 parent 8edd920 commit e7abd3b

File tree

3 files changed

+46
-5
lines changed

3 files changed

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

docs/source/models_new.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ pre-trained weights:
147147
:maxdepth: 1
148148

149149
models/googlenet_quant
150+
models/inception_quant
150151
models/mobilenetv2_quant
151152

152153
|

torchvision/models/quantization/inception.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def inception_v3(
208208
**kwargs: Any,
209209
) -> QuantizableInception3:
210210
r"""Inception v3 model architecture from
211-
`"Rethinking the Inception Architecture for Computer Vision" <http://arxiv.org/abs/1512.00567>`_.
211+
`Rethinking the Inception Architecture for Computer Vision <http://arxiv.org/abs/1512.00567>`__.
212212
213213
.. note::
214214
**Important**: In contrast to the other models the inception_v3 expects tensors with a size of
@@ -219,10 +219,26 @@ def inception_v3(
219219
GPU inference is not yet supported
220220
221221
Args:
222-
weights (Inception_V3_QuantizedWeights or Inception_V3_Weights, optional): The pretrained
223-
weights for the model
224-
progress (bool): If True, displays a progress bar of the download to stderr
225-
quantize (bool): If True, return a quantized version of the model
222+
weights (:class:`~torchvision.models.quantization.Inception_V3_QuantizedWeights` or :class:`~torchvision.models.Inception_V3_Weights`, optional): The pretrained
223+
weights for the model. See
224+
:class:`~torchvision.models.quantization.Inception_V3_QuantizedWeights` below for
225+
more details, and possible values. By default, no pre-trained
226+
weights are used.
227+
progress (bool, optional): If True, displays a progress bar of the download to stderr.
228+
Default is True.
229+
quantize (bool, optional): If True, return a quantized version of the model.
230+
Default is False.
231+
**kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableInception3``
232+
base class. Please refer to the `source code
233+
<https://github.com/pytorch/vision/blob/main/torchvision/models/quantization/inception.py>`_
234+
for more details about this class.
235+
236+
.. autoclass:: torchvision.models.quantization.Inception_V3_QuantizedWeights
237+
:members:
238+
239+
.. autoclass:: torchvision.models.Inception_V3_Weights
240+
:members:
241+
:noindex:
226242
"""
227243
weights = (Inception_V3_QuantizedWeights if quantize else Inception_V3_Weights).verify(weights)
228244

0 commit comments

Comments
 (0)