ResNet-50 from `Deep Residual Learning for Image Recognition `__. .. 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
(*, weights: Optional[ResNet50_Weights] = None, progress: bool = True, **kwargs: Any)
| 734 | @register_model() |
| 735 | @handle_legacy_interface(weights=("pretrained", ResNet50_Weights.IMAGENET1K_V1)) |
| 736 | def resnet50(*, weights: Optional[ResNet50_Weights] = None, progress: bool = True, **kwargs: Any) -> ResNet: |
| 737 | """ResNet-50 from `Deep Residual Learning for Image Recognition <https://arxiv.org/abs/1512.03385>`__. |
| 738 | |
| 739 | .. note:: |
| 740 | The bottleneck of TorchVision places the stride for downsampling to the second 3x3 |
| 741 | convolution while the original paper places it to the first 1x1 convolution. |
| 742 | This variant improves the accuracy and is known as `ResNet V1.5 |
| 743 | <https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch>`_. |
| 744 | |
| 745 | Args: |
| 746 | weights (:class:`~torchvision.models.ResNet50_Weights`, optional): The |
| 747 | pretrained weights to use. See |
| 748 | :class:`~torchvision.models.ResNet50_Weights` below for |
| 749 | more details, and possible values. By default, no pre-trained |
| 750 | weights are used. |
| 751 | progress (bool, optional): If True, displays a progress bar of the |
| 752 | download to stderr. Default is True. |
| 753 | **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` |
| 754 | base class. Please refer to the `source code |
| 755 | <https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_ |
| 756 | for more details about this class. |
| 757 | |
| 758 | .. autoclass:: torchvision.models.ResNet50_Weights |
| 759 | :members: |
| 760 | """ |
| 761 | weights = ResNet50_Weights.verify(weights) |
| 762 | |
| 763 | return _resnet(Bottleneck, [3, 4, 6, 3], weights, progress, **kwargs) |
| 764 | |
| 765 | |
| 766 | @register_model() |
searching dependent graphs…