resnet.rst 1.01 KB
Newer Older
1
2
3
4
5
6
7
8
ResNet
======

.. currentmodule:: torchvision.models

The ResNet model is based on the `Deep Residual Learning for Image Recognition
<https://arxiv.org/abs/1512.03385>`_ paper.

9
10
11
12
13
.. note::
    The bottleneck of TorchVision places the stride for downsampling to the second 3x3
    convolution while the original paper places it to the first 1x1 convolution.
    This variant improves the accuracy and is known as `ResNet V1.5
    <https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch>`_.
14
15
16
17

Model builders
--------------

18
The following model builders can be used to instantiate a ResNet model, with or
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
without pre-trained weights. All the model builders internally rely on the
``torchvision.models.resnet.ResNet`` base class. Please refer to the `source
code
<https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_ for
more details about this class.

.. autosummary::
    :toctree: generated/
    :template: function.rst

    resnet18
    resnet34
    resnet50
    resnet101
    resnet152