From 005c06a7741581feae989e8ab66d90ea3fa6245f Mon Sep 17 00:00:00 2001 From: frgfm <26927750+frgfm@users.noreply.github.com> Date: Tue, 17 May 2022 00:04:17 +0200 Subject: [PATCH 1/2] docs: Added quantized ResNeXt to new docs --- docs/source/models/resnext_quant.rst | 25 +++++++++++++++++++++++++ docs/source/models_new.rst | 1 + 2 files changed, 26 insertions(+) create mode 100644 docs/source/models/resnext_quant.rst diff --git a/docs/source/models/resnext_quant.rst b/docs/source/models/resnext_quant.rst new file mode 100644 index 00000000000..916b9e4a39a --- /dev/null +++ b/docs/source/models/resnext_quant.rst @@ -0,0 +1,25 @@ +Quantized ResNeXt +================= + +.. currentmodule:: torchvision.models.quantization + +The quantized ResNext model is based on the `Aggregated Residual Transformations for Deep Neural Networks `__ +paper. + + +Model builders +-------------- + +The following model builders can be used to instantiate a quantized ResNeXt +model, with or without pre-trained weights. All the model builders internally +rely on the ``torchvision.models.quantization.resnet.QuantizableResNet`` +base class. Please refer to the `source code +`_ +for more details about this class. + +.. autosummary:: + :toctree: generated/ + :template: function.rst + + resnext101_32x8d + resnext101_64x4d diff --git a/docs/source/models_new.rst b/docs/source/models_new.rst index 6ded8480425..94ffe733538 100644 --- a/docs/source/models_new.rst +++ b/docs/source/models_new.rst @@ -206,6 +206,7 @@ pre-trained weights: models/mobilenetv2_quant models/mobilenetv3_quant models/resnet_quant + models/resnext_quant models/shufflenetv2_quant | From f7c08b2bc7af8fe43ffb4902df1db39a32954324 Mon Sep 17 00:00:00 2001 From: frgfm <26927750+frgfm@users.noreply.github.com> Date: Tue, 17 May 2022 00:04:30 +0200 Subject: [PATCH 2/2] docs: Fixed docstring --- torchvision/models/quantization/resnet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchvision/models/quantization/resnet.py b/torchvision/models/quantization/resnet.py index a2c65170309..2a13504a369 100644 --- a/torchvision/models/quantization/resnet.py +++ b/torchvision/models/quantization/resnet.py @@ -366,7 +366,7 @@ def resnext101_32x8d( **kwargs: Any, ) -> QuantizableResNet: """ResNeXt-101 32x8d model from - `Aggregated Residual Transformation for Deep Neural Networks `_ + `Aggregated Residual Transformation for Deep Neural Networks `_ .. note:: Note that ``quantize = True`` returns a quantized model with 8 bit @@ -409,7 +409,7 @@ def resnext101_64x4d( **kwargs: Any, ) -> QuantizableResNet: """ResNeXt-101 64x4d model from - `Aggregated Residual Transformation for Deep Neural Networks `_ + `Aggregated Residual Transformation for Deep Neural Networks `_ .. note:: Note that ``quantize = True`` returns a quantized model with 8 bit