class_docstr: ResNet model from
  `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_
  
  Args:
      Block (BasicBlock|BottleneckBlock): block module of model.
      depth (int): layers of resnet, default: 50.
      width (int): base width of resnet, default: 64.
      num_classes (int): output dim of last fc layer. If num_classes <=0, last fc layer
                          will not be defined. Default: 1000.
      with_pool (bool): use pool before the last fc layer or not. Default: True.
  
  Examples:
      .. code-block:: python
  
          import paddle
          from paddle.vision.models import ResNet
          from paddle.vision.models.resnet import BottleneckBlock, BasicBlock
  
          resnet50 = ResNet(BottleneckBlock, 50)
  
          wide_resnet50_2 = ResNet(BottleneckBlock, 50, width=64*2)
  
          resnet18 = ResNet(BasicBlock, 18)
  
          x = paddle.rand([1, 3, 224, 224])
          out = resnet18(x)
  
          print(out.shape)
code: def _make_layer(self, block, planes, blocks, stride=1, dilate=False):
      norm_layer = self._norm_layer
      downsample = None
      previous_dilation = self.dilation
      if dilate:
          self.dilation *= stride
          stride = 1
      if stride != 1 or self.inplanes != planes * block.expansion:
          downsample = nn.Sequential(
              nn.Conv2D(
                  self.inplanes,
                  planes * block.expansion,
                  1,
                  stride=stride,
                  bias_attr=False,
              ),
              norm_layer(planes * block.expansion),
          )
  
      layers = []
      layers.append(
          block(
              self.inplanes,
              planes,
              stride,
              downsample,
              self.groups,
              self.base_width,
              previous_dilation,
              norm_layer,
          )
      )
      self.inplanes = planes * block.expansion
      for _ in range(1, blocks):
          layers.append(
              block(
                  self.inplanes,
                  planes,
                  groups=self.groups,
                  base_width=self.base_width,
                  norm_layer=norm_layer,
              )
          )
  
      return nn.Sequential(*layers)
  
imports: from __future__ import print_function
  import paddle
  import paddle.nn
  from paddle.utils.download import get_weights_path_from_url
label_desc: Use image node_id 2 for calling the ResNet obj's underlying member method code with example usage: obj._make_layer(block, planes, blocks, stride, dilate) and returns: nn