__init__.py 978 Bytes
Newer Older
1
2
3
4
5
6
"""The models subpackage contains definitions for the following model
architectures:

-  `AlexNet`_
-  `VGG`_
-  `ResNet`_
7
-  `SqueezeNet`_
8
9
10
11
12
13
14
15

You can construct a model with random weights by calling its constructor:

.. code:: python

    import torchvision.models as models
    resnet18 = models.resnet18()
    alexnet = models.alexnet()
16
    squeezenet = models.squeezenet1_0()
17
18
19
20
21
22
23
24
25
26
27
28
29
30

We provide pre-trained models for the ResNet variants and AlexNet, using the
PyTorch :mod:`torch.utils.model_zoo`. These can  constructed by passing
``pretrained=True``:

.. code:: python

    import torchvision.models as models
    resnet18 = models.resnet18(pretrained=True)
    alexnet = models.alexnet(pretrained=True)

.. _AlexNet: https://arxiv.org/abs/1404.5997
.. _VGG: https://arxiv.org/abs/1409.1556
.. _ResNet: https://arxiv.org/abs/1512.03385
31
.. _SqueezeNet: https://arxiv.org/abs/1602.07360
32
33
"""

34
35
36
from .alexnet import *
from .resnet import *
from .vgg import *
37
from .squeezenet import *