diff --git a/torchvision/models/quantization/googlenet.py b/torchvision/models/quantization/googlenet.py index 892b3408706..5df391044ff 100644 --- a/torchvision/models/quantization/googlenet.py +++ b/torchvision/models/quantization/googlenet.py @@ -143,9 +143,10 @@ def googlenet( ) -> QuantizableGoogLeNet: """GoogLeNet (Inception v1) model architecture from `Going Deeper with Convolutions `__. - Note that ``quantize = True`` returns a quantized model with 8 bit - weights. Quantized models only support inference and run on CPUs. - GPU inference is not yet supported + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. Args: weights (:class:`~torchvision.models.quantization.GoogLeNet_QuantizedWeights` or :class:`~torchvision.models.GoogLeNet_Weights`, optional): The diff --git a/torchvision/models/quantization/inception.py b/torchvision/models/quantization/inception.py index 54a993200a6..1fbfb00fe75 100644 --- a/torchvision/models/quantization/inception.py +++ b/torchvision/models/quantization/inception.py @@ -214,9 +214,10 @@ def inception_v3( **Important**: In contrast to the other models the inception_v3 expects tensors with a size of N x 3 x 299 x 299, so ensure your images are sized accordingly. - Note that quantize = True returns a quantized model with 8 bit - weights. Quantized models only support inference and run on CPUs. - GPU inference is not yet supported + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. Args: weights (:class:`~torchvision.models.quantization.Inception_V3_QuantizedWeights` or :class:`~torchvision.models.Inception_V3_Weights`, optional): The pretrained diff --git a/torchvision/models/quantization/mobilenetv2.py b/torchvision/models/quantization/mobilenetv2.py index ce72967730c..0d2e35c8566 100644 --- a/torchvision/models/quantization/mobilenetv2.py +++ b/torchvision/models/quantization/mobilenetv2.py @@ -104,9 +104,10 @@ def mobilenet_v2( `MobileNetV2: Inverted Residuals and Linear Bottlenecks `_. - Note that quantize = True returns a quantized model with 8 bit - weights. Quantized models only support inference and run on CPUs. - GPU inference is not yet supported + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. Args: weights (:class:`~torchvision.models.quantization.MobileNet_V2_QuantizedWeights` or :class:`~torchvision.models.MobileNet_V2_Weights`, optional): The diff --git a/torchvision/models/quantization/mobilenetv3.py b/torchvision/models/quantization/mobilenetv3.py index 42eca308ac3..804e0c77bc9 100644 --- a/torchvision/models/quantization/mobilenetv3.py +++ b/torchvision/models/quantization/mobilenetv3.py @@ -200,7 +200,7 @@ def mobilenet_v3_large( .. note:: Note that ``quantize = True`` returns a quantized model with 8 bit weights. Quantized models only support inference and run on CPUs. - GPU inference is not yet supported + GPU inference is not yet supported. Args: weights (:class:`~torchvision.models.quantization.MobileNet_V3_Large_QuantizedWeights` or :class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The diff --git a/torchvision/models/quantization/resnet.py b/torchvision/models/quantization/resnet.py index 556aa98877c..a2c65170309 100644 --- a/torchvision/models/quantization/resnet.py +++ b/torchvision/models/quantization/resnet.py @@ -270,6 +270,11 @@ def resnet18( """ResNet-18 model from `Deep Residual Learning for Image Recognition `_ + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + Args: weights (:class:`~torchvision.models.quantization.ResNet18_QuantizedWeights` or :class:`~torchvision.models.ResNet18_Weights`, optional): The pretrained weights for the model. See @@ -314,6 +319,11 @@ def resnet50( """ResNet-50 model from `Deep Residual Learning for Image Recognition `_ + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + Args: weights (:class:`~torchvision.models.quantization.ResNet50_QuantizedWeights` or :class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained weights for the model. See @@ -358,6 +368,11 @@ def resnext101_32x8d( """ResNeXt-101 32x8d model from `Aggregated Residual Transformation for Deep Neural Networks `_ + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + Args: weights (:class:`~torchvision.models.quantization.ResNet101_32X8D_QuantizedWeights` or :class:`~torchvision.models.ResNet101_32X8D_Weights`, optional): The pretrained weights for the model. See @@ -396,6 +411,11 @@ def resnext101_64x4d( """ResNeXt-101 64x4d model from `Aggregated Residual Transformation for Deep Neural Networks `_ + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + Args: weights (:class:`~torchvision.models.quantization.ResNet101_64X4D_QuantizedWeights` or :class:`~torchvision.models.ResNet101_64X4D_Weights`, optional): The pretrained weights for the model. See diff --git a/torchvision/models/quantization/shufflenetv2.py b/torchvision/models/quantization/shufflenetv2.py index 90a4f298ac9..bfb708ae768 100644 --- a/torchvision/models/quantization/shufflenetv2.py +++ b/torchvision/models/quantization/shufflenetv2.py @@ -208,6 +208,11 @@ def shufflenet_v2_x0_5( `"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design" `_. + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + Args: weights (ShuffleNet_V2_X0_5_QuantizedWeights or ShuffleNet_V2_X0_5_Weights, optional): The pretrained weights for the model @@ -240,6 +245,11 @@ def shufflenet_v2_x1_0( `"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design" `_. + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + Args: weights (ShuffleNet_V2_X1_0_QuantizedWeights or ShuffleNet_V2_X1_0_Weights, optional): The pretrained weights for the model @@ -264,6 +274,11 @@ def shufflenet_v2_x1_5( `"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design" `_. + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + Args: weights (ShuffleNet_V2_X1_5_QuantizedWeights or ShuffleNet_V2_X1_5_Weights, optional): The pretrained weights for the model @@ -288,6 +303,11 @@ def shufflenet_v2_x2_0( `"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design" `_. + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + Args: weights (ShuffleNet_V2_X2_0_QuantizedWeights or ShuffleNet_V2_X2_0_Weights, optional): The pretrained weights for the model