diff --git a/docs/source/models/alexnet.rst b/docs/source/models/alexnet.rst new file mode 100644 index 00000000000..ea5ff524c7e --- /dev/null +++ b/docs/source/models/alexnet.rst @@ -0,0 +1,25 @@ +AlexNet +======= + +.. currentmodule:: torchvision.models + +The AlexNet model is based on the `ImageNet Classification with Deep Convolutional Neural Networks + `__ +paper. + + +Model builders +-------------- + +The following model builders can be used to instanciate an AlexNet model, with or +without pre-trained weights. All the model builders internally rely on the +``torchvision.models.alexnet.AlexNet`` base class. Please refer to the `source +code +`_ for +more details about this class. + +.. autosummary:: + :toctree: generated/ + :template: function.rst + + alexnet diff --git a/docs/source/models/efficientnetv2.rst b/docs/source/models/efficientnetv2.rst index 023b9f58f9b..05c953b1327 100644 --- a/docs/source/models/efficientnetv2.rst +++ b/docs/source/models/efficientnetv2.rst @@ -1,5 +1,5 @@ EfficientNetV2 -============ +============== .. currentmodule:: torchvision.models diff --git a/docs/source/models_new.rst b/docs/source/models_new.rst index 12f84165e27..7df9522f306 100644 --- a/docs/source/models_new.rst +++ b/docs/source/models_new.rst @@ -36,6 +36,7 @@ weights: .. toctree:: :maxdepth: 1 + models/alexnet models/convnext models/densenet models/efficientnet diff --git a/torchvision/models/alexnet.py b/torchvision/models/alexnet.py index 348417693b2..cca6d715640 100644 --- a/torchvision/models/alexnet.py +++ b/torchvision/models/alexnet.py @@ -73,13 +73,27 @@ class AlexNet_Weights(WeightsEnum): @handle_legacy_interface(weights=("pretrained", AlexNet_Weights.IMAGENET1K_V1)) def alexnet(*, weights: Optional[AlexNet_Weights] = None, progress: bool = True, **kwargs: Any) -> AlexNet: r"""AlexNet model architecture from the - `"One weird trick..." `_ paper. - The required minimum input size of the model is 63x63. - - Args: - weights (AlexNet_Weights, optional): The pretrained weights for the model - progress (bool): If True, displays a progress bar of the download to stderr + `ImageNet Classification with Deep Convolutional Neural Networks + `_ paper. + The required minimum input size of the model is 63x63. + + Args: + weights (:class:`~torchvision.models.AlexNet_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.AlexNet_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.squeezenet.AlexNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.AlexNet_Weights + :members: """ + weights = AlexNet_Weights.verify(weights) if weights is not None: