code: def forward(self, x):
      features = []
      b, c, in_size, _ = x.shape
      x = self.root(x)
      features.append(x)
      x = nn.MaxPool2D(kernel_size=3, stride=2, padding=0)(x)
      for i in range(len(self.body) - 1):
          x = self.body[i](x)
          right_size = int(in_size / 4 / (i + 1))
          if x.shape[2] == right_size:
              feat = x
          else:
              feat = paddle.zeros(
                  (b, x.shape[1], right_size, right_size)
              )
              feat[:, :, 0 : x.shape[2], 0 : x.shape[3]] = x[:]
          features.append(feat)
      x = self.body[-1](x)
      return x, features[::-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 2 for calling the ResNet obj's underlying member method code with example usage: obj.forward(x) and returns: x,  features