code: def __init__(self, block=BottleneckBlock, depth=50, with_pool=True):
      super(ResNet, self).__init__()
      layer_cfg = {
          18: [2, 2, 2, 2],
          34: [3, 4, 6, 3],
          50: [3, 4, 6, 3],
          101: [3, 4, 23, 3],
          152: [3, 8, 36, 3],
      }
      layers = layer_cfg[depth]
      self.with_pool = with_pool
      self._norm_layer = nn.BatchNorm2D
  
      self.inplanes = 64
      self.dilation = 1
  
      self.conv1 = nn.Conv2D(
          3,
          self.inplanes,
          kernel_size=7,
          stride=2,
          padding=3,
          bias_attr=False,
      )
      self.bn1 = self._norm_layer(self.inplanes)
      self.relu = nn.ReLU()
      self.maxpool = nn.MaxPool2D(kernel_size=3, stride=2, padding=1)
      self.layer1 = self._make_layer(block, 64, layers[0])
      self.layer2 = self._make_layer(block, 128, layers[1], stride=2)
      self.layer3 = self._make_layer(block, 256, layers[2], stride=2)
      self.layer4 = self._make_layer(block, 512, layers[3], stride=2)
      if with_pool:
          self.avgpool = nn.AdaptiveAvgPool2D((1, 1))
  
imports: import os
  from typing import Union
  import numpy
  import paddle
  import paddle.nn
  import paddlehub.vision.transforms
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.cv_module import ImageClassifierModule
label_desc: Use image node_id 1 to create a new ResNet object from inherited base classes: nn with example: obj = ResNet(block, depth, with_pool)