code: def __init__(self, block_units, width_factor):
      super().__init__()
      width = int(64 * width_factor)
      self.width = width
  
      self.root = nn.Sequential(
          (
              "conv",
              StdConv2d(
                  3,
                  width,
                  kernel_size=7,
                  stride=2,
                  bias_attr=False,
                  padding=3,
              ),
          ),
          ("gn", nn.GroupNorm(32, width, epsilon=1e-6)),
          ("relu", nn.ReLU()),
      )
  
      self.body = nn.Sequential(
          (
              "block1",
              nn.Sequential(
                  *(
                      [
                          (
                              "unit1",
                              Bottleneck(
                                  cin=width, cout=width * 4, cmid=width
                              ),
                          )
                      ]
                      + [
                          (
                              f"unit{i:d}",
                              Bottleneck(
                                  cin=width * 4,
                                  cout=width * 4,
                                  cmid=width,
                              ),
                          )
                          for i in range(2, block_units[0] + 1)
                      ]
                  )
              ),
          ),
          (
              "block2",
              nn.Sequential(
                  *(
                      [
                          (
                              "unit1",
                              Bottleneck(
                                  cin=width * 4,
                                  cout=width * 8,
                                  cmid=width * 2,
                                  stride=2,
                              ),
                          )
                      ]
                      + [
                          (
                              f"unit{i:d}",
                              Bottleneck(
                                  cin=width * 8,
                                  cout=width * 8,
                                  cmid=width * 2,
                              ),
                          )
                          for i in range(2, block_units[1] + 1)
                      ]
                  )
              ),
          ),
          (
              "block3",
              nn.Sequential(
                  *(
                      [
                          (
                              "unit1",
                              Bottleneck(
                                  cin=width * 8,
                                  cout=width * 16,
                                  cmid=width * 4,
                                  stride=2,
                              ),
                          )
                      ]
                      + [
                          (
                              f"unit{i:d}",
                              Bottleneck(
                                  cin=width * 16,
                                  cout=width * 16,
                                  cmid=width * 4,
                              ),
                          )
                          for i in range(2, block_units[2] + 1)
                      ]
                  )
              ),
          ),
      )
  
file_path: PaddleSeg/contrib/MedicalSeg/medicalseg/models/backbones/resnet.py
imports: from os.path import join
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from medicalseg.cvlibs import manager
label_desc: Use image node_id 1 to create a new ResNet object from inherited base classes: nn with example: obj = ResNet(block_units, width_factor)