code: def resnet50(pretrained=False, **kwargs):
      """ResNet 50-layer model from
      `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_.
      Args:
          pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
                              on ImageNet. Default: False.
          **kwargs (optional): Additional keyword arguments. For details, please refer to :ref:`ResNet <api_paddle_vision_ResNet>`.
      Returns:
          :ref:`api_paddle_nn_Layer`. An instance of ResNet 50-layer model.
      Examples:
          .. code-block:: python
              import paddle
              from paddle.vision.models import resnet50
              # build model
              model = resnet50()
              # build model and load imagenet pretrained weight
              # model = resnet50(pretrained=True)
              x = paddle.rand([1, 3, 224, 224])
              out = model(x)
              print(out.shape)
              # [1, 1000]
      """
      return _resnet(
          "resnet50", BottleneckBlock, 50, pretrained, **kwargs
      )
  
imports: from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  from paddle.utils.download import get_weights_path_from_url
  from ppdet.core.workspace import register, serializable
  from ..shape_spec import ShapeSpec
label_desc: Use image node_id 4 for calling a global function with example usage: resnet50(pretrained) and returns: _resnet