Unverified Commit 79703b26 authored by Yassine Alouini's avatar Yassine Alouini Committed by GitHub
Browse files

AlexNet New Documentation. (#5886)



* [DOC] Add alexnet new documentation.

* [FIX] Fix wrong alexnet header.

* [FIX] Fix the AlexNet paper link.
Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
parent 413b7103
AlexNet
=======
.. currentmodule:: torchvision.models
The AlexNet model is based on the `ImageNet Classification with Deep Convolutional Neural Networks
<https://papers.nips.cc/paper/2012/hash/c399862d3b9d6b76c8436e924a68c45b-Abstract.html>`__
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
<https://github.com/pytorch/vision/blob/main/torchvision/models/alexnet.py>`_ for
more details about this class.
.. autosummary::
:toctree: generated/
:template: function.rst
alexnet
EfficientNetV2 EfficientNetV2
============ ==============
.. currentmodule:: torchvision.models .. currentmodule:: torchvision.models
......
...@@ -36,6 +36,7 @@ weights: ...@@ -36,6 +36,7 @@ weights:
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
models/alexnet
models/convnext models/convnext
models/densenet models/densenet
models/efficientnet models/efficientnet
......
...@@ -73,13 +73,27 @@ class AlexNet_Weights(WeightsEnum): ...@@ -73,13 +73,27 @@ class AlexNet_Weights(WeightsEnum):
@handle_legacy_interface(weights=("pretrained", AlexNet_Weights.IMAGENET1K_V1)) @handle_legacy_interface(weights=("pretrained", AlexNet_Weights.IMAGENET1K_V1))
def alexnet(*, weights: Optional[AlexNet_Weights] = None, progress: bool = True, **kwargs: Any) -> AlexNet: def alexnet(*, weights: Optional[AlexNet_Weights] = None, progress: bool = True, **kwargs: Any) -> AlexNet:
r"""AlexNet model architecture from the r"""AlexNet model architecture from the
`"One weird trick..." <https://arxiv.org/abs/1404.5997>`_ paper. `ImageNet Classification with Deep Convolutional Neural Networks
The required minimum input size of the model is 63x63. <https://papers.nips.cc/paper/2012/hash/c399862d3b9d6b76c8436e924a68c45b-Abstract.html>`_ paper.
The required minimum input size of the model is 63x63.
Args:
weights (AlexNet_Weights, optional): The pretrained weights for the model Args:
progress (bool): If True, displays a progress bar of the download to stderr 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
<https://github.com/pytorch/vision/blob/main/torchvision/models/alexnet.py>`_
for more details about this class.
.. autoclass:: torchvision.models.AlexNet_Weights
:members:
""" """
weights = AlexNet_Weights.verify(weights) weights = AlexNet_Weights.verify(weights)
if weights is not None: if weights is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment