diff --git a/docs/source/models.rst b/docs/source/models.rst index 3b1db1b3bf4..919ab1d37e4 100644 --- a/docs/source/models.rst +++ b/docs/source/models.rst @@ -457,7 +457,7 @@ ConvNeXt convnext_large SwinTransformer --------- +--------------- .. autosummary:: :toctree: generated/ diff --git a/docs/source/models/inception.rst b/docs/source/models/inception.rst new file mode 100644 index 00000000000..6ba42fc2385 --- /dev/null +++ b/docs/source/models/inception.rst @@ -0,0 +1,23 @@ +Inception V3 +============ + +.. currentmodule:: torchvision.models + +The EfficientNet model is based on the `Rethinking the Inception Architecture for Computer Vision `__ +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 `_ for +more details about this class. + +.. autosummary:: + :toctree: generated/ + :template: function.rst + + inception_v3 diff --git a/docs/source/models_new.rst b/docs/source/models_new.rst index 51c41434f61..0bda2f3f74e 100644 --- a/docs/source/models_new.rst +++ b/docs/source/models_new.rst @@ -42,6 +42,7 @@ weights: models/efficientnet models/efficientnetv2 models/googlenet + models/inception models/mobilenetv2 models/mobilenetv3 models/regnet diff --git a/torchvision/models/googlenet.py b/torchvision/models/googlenet.py index cb65306b9fd..3de5662d59b 100644 --- a/torchvision/models/googlenet.py +++ b/torchvision/models/googlenet.py @@ -307,7 +307,7 @@ def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = T weights are used. progress (bool, optional): If True, displays a progress bar of the 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 `_ for more details about this class. diff --git a/torchvision/models/inception.py b/torchvision/models/inception.py index 1428f7f7002..e8eecca5db6 100644 --- a/torchvision/models/inception.py +++ b/torchvision/models/inception.py @@ -427,8 +427,9 @@ class Inception_V3_Weights(WeightsEnum): @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: - r"""Inception v3 model architecture from - `"Rethinking the Inception Architecture for Computer Vision" `_. + """ + Inception v3 model architecture from + `Rethinking the Inception Architecture for Computer Vision `_. The required minimum input size of the model is 75x75. .. note:: @@ -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. Args: - weights (Inception_V3_Weights, optional): The pretrained weights for the model - progress (bool): If True, displays a progress bar of the download to stderr - aux_logits (bool): If True, add an auxiliary branch that can improve training. - Default: *True* - transform_input (bool): If True, preprocesses the input according to the method with which it - was trained on ImageNet. Default: True if ``weights=Inception_V3_Weights.IMAGENET1K_V1``, else False. + weights (:class:`~torchvision.models.Inception_V3_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.Inception_V3_Weights` 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. + **kwargs: parameters passed to the ``torchvision.models.Inception3`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.Inception_V3_Weights + :members: """ weights = Inception_V3_Weights.verify(weights)