code: def __init__(self, multi_grid: tuple = (1, 2, 4)):
      super(ResNet50_vd, self).__init__()
      depth = [3, 4, 6, 3]
      num_channels = [64, 256, 512, 1024]
      num_filters = [64, 128, 256, 512]
      self.feat_channels = [c * 4 for c in num_filters]
      dilation_dict = {2: 2, 3: 4}
      self.conv1_1 = L.ConvBNLayer(
          in_channels=3,
          out_channels=32,
          kernel_size=3,
          stride=2,
          act="relu",
          name="conv1_1",
      )
      self.conv1_2 = L.ConvBNLayer(
          in_channels=32,
          out_channels=32,
          kernel_size=3,
          stride=1,
          act="relu",
          name="conv1_2",
      )
      self.conv1_3 = L.ConvBNLayer(
          in_channels=32,
          out_channels=64,
          kernel_size=3,
          stride=1,
          act="relu",
          name="conv1_3",
      )
      self.pool2d_max = nn.MaxPool2D(kernel_size=3, stride=2, padding=1)
      self.stage_list = []
  
      for block in range(len(depth)):
          shortcut = False
          block_list = []
          for i in range(depth[block]):
              conv_name = "res" + str(block + 2) + chr(97 + i)
              dilation_rate = (
                  dilation_dict[block]
                  if dilation_dict and block in dilation_dict
                  else 1
              )
              if block == 3:
                  dilation_rate = dilation_rate * multi_grid[i]
              bottleneck_block = self.add_sublayer(
                  "bb_%d_%d" % (block, i),
                  L.BottleneckBlock(
                      in_channels=num_channels[block]
                      if i == 0
                      else num_filters[block] * 4,
                      out_channels=num_filters[block],
                      stride=2
                      if i == 0 and block != 0 and dilation_rate == 1
                      else 1,
                      shortcut=shortcut,
                      if_first=block == i == 0,
                      name=conv_name,
                      dilation=dilation_rate,
                  ),
              )
              block_list.append(bottleneck_block)
              shortcut = True
          self.stage_list.append(block_list)
  
file_path: PaddleHub/modules/image/semantic_segmentation/ginet_resnet50vd_ade20k/resnet.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  import ginet_resnet50vd_ade20k.layers
label_desc: Use image node_id 1 to create a new ResNet50_vd object from inherited base classes: nn with example: obj = ResNet50_vd(multi_grid)