class_docstr: The HRFormer implementation based on PaddlePaddle.
  
  The original article refers to
  Jingdong Wang, et, al. "HRNet：Deep High-Resolution Representation Learning for Visual Recognition"
  (https://arxiv.org/pdf/1908.07919.pdf).
  
  Args:
      drop_path_rate (float, optional): The rate of Drop Path. Default: 0.2.
      stage1_num_blocks (list[int], optional): Number of blocks per module for stage1. Default: [2].
      stage1_num_channels (list[int], optional): Number of channels per branch for stage1. Default: [64].
      stage2_num_modules (int, optional): Number of modules for stage2. Default: 1.
      stage2_num_branches (int, optional): Number of branches for stage2. Default: 2.
      stage2_num_blocks (list[int], optional): Number of blocks per module for stage2. Default: [2, 2].
      stage2_num_channels (list[int], optional): Number of channels per branch for stage2. Default: [32, 64].
      stage2_num_heads (list[int], optional): Number of heads per multi head attetion for stage2. Default: [1, 2].
      stage2_num_mlp_ratios (list[int], optional): Number of ratio of mlp per multi head attetion for stage2. Default: [4, 4].
      stage2_num_window_sizes (list[int], optional): Number of window sizes for stage2. Default: [7, 7].
      stage3_num_modules (int, optional): Number of modules for stage3. Default: 4.
      stage3_num_branches (int, optional): Number of branches for stage3. Default: 3.
      stage3_num_blocks (list[int], optional): Number of blocks per module for stage3. Default: [2, 2, 2].
      stage3_num_channels (list[int], optional): Number of channels per branch for stage3. Default: [32, 64, 128].
      stage3_num_heads (list[int], optional): Number of heads per multi head attetion for stage3. Default: [1, 2, 4].
      stage3_num_mlp_ratios (list[int], optional): Number of ratio of mlp per multi head attetion for stage3. Default: [4, 4, 4].
      stage3_num_window_sizes (list[int], optional): Number of window sizes for stage3. Default: [7, 7, 7].
      stage4_num_modules (int, optional): Number of modules for stage4. Default: 2.
      stage4_num_branches (int, optional): Number of branches for stage4. Default: 4.
      stage4_num_blocks (list[int], optional): Number of blocks per module for stage4. Default: [2, 2, 2, 2].
      stage4_num_channels (list[int], optional): Number of channels per branch for stage4. Default: [32, 64, 128, 256].
      stage4_num_heads (list[int], optional): Number of heads per multi head attetion for stage4. Default: [1, 2, 4, 8].
      stage4_num_mlp_ratios (list[int], optional): Number of ratio of mlp per multi head attetion for stage4. Default: [4, 4, 4, 4].
      stage4_num_window_sizes (list[int], optional): Number of window sizes for stage4. Default: [7, 7, 7, 7].
      in_channels (int, optional): The channels of input image. Default: 3.
      pretrained (str, optional): The path of pretrained model. Default: None.
class_docstr_tok: ["The","HRFormer","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Jingdong","Wang",",","et",",","al",".","``","HRNet\uff1aDeep","High-Resolution","Representation","Learning","for","Visual","Recognition","''","(","https",":","\/\/arxiv.org\/pdf\/1908.07919.pdf",")",".","Args",":","drop_path_rate","(","float",",","optional",")",":","The","rate","of","Drop","Path",".","Default",":","0.2.","stage1_num_blocks","(","list","[","int","]",",","optional",")",":","Number","of","blocks","per","module","for","stage1",".","Default",":","[","2","]",".","stage1_num_channels","(","list","[","int","]",",","optional",")",":","Number","of","channels","per","branch","for","stage1",".","Default",":","[","64","]",".","stage2_num_modules","(","int",",","optional",")",":","Number","of","modules","for","stage2",".","Default",":","1.","stage2_num_branches","(","int",",","optional",")",":","Number","of","branches","for","stage2",".","Default",":","2.","stage2_num_blocks","(","list","[","int","]",",","optional",")",":","Number","of","blocks","per","module","for","stage2",".","Default",":","[","2",",","2","]",".","stage2_num_channels","(","list","[","int","]",",","optional",")",":","Number","of","channels","per","branch","for","stage2",".","Default",":","[","32",",","64","]",".","stage2_num_heads","(","list","[","int","]",",","optional",")",":","Number","of","heads","per","multi","head","attetion","for","stage2",".","Default",":","[","1",",","2","]",".","stage2_num_mlp_ratios","(","list","[","int","]",",","optional",")",":","Number","of","ratio","of","mlp","per","multi","head","attetion","for","stage2",".","Default",":","[","4",",","4","]",".","stage2_num_window_sizes","(","list","[","int","]",",","optional",")",":","Number","of","window","sizes","for","stage2",".","Default",":","[","7",",","7","]",".","stage3_num_modules","(","int",",","optional",")",":","Number","of","modules","for","stage3",".","Default",":","4.","stage3_num_branches","(","int",",","optional",")",":","Number","of","branches","for","stage3",".","Default",":","3.","stage3_num_blocks","(","list","[","int","]",",","optional",")",":","Number","of","blocks","per","module","for","stage3",".","Default",":","[","2",",","2",",","2","]",".","stage3_num_channels","(","list","[","int","]",",","optional",")",":","Number","of","channels","per","branch","for","stage3",".","Default",":","[","32",",","64",",","128","]",".","stage3_num_heads","(","list","[","int","]",",","optional",")",":","Number","of","heads","per","multi","head","attetion","for","stage3",".","Default",":","[","1",",","2",",","4","]",".","stage3_num_mlp_ratios","(","list","[","int","]",",","optional",")",":","Number","of","ratio","of","mlp","per","multi","head","attetion","for","stage3",".","Default",":","[","4",",","4",",","4","]",".","stage3_num_window_sizes","(","list","[","int","]",",","optional",")",":","Number","of","window","sizes","for","stage3",".","Default",":","[","7",",","7",",","7","]",".","stage4_num_modules","(","int",",","optional",")",":","Number","of","modules","for","stage4",".","Default",":","2.","stage4_num_branches","(","int",",","optional",")",":","Number","of","branches","for","stage4",".","Default",":","4.","stage4_num_blocks","(","list","[","int","]",",","optional",")",":","Number","of","blocks","per","module","for","stage4",".","Default",":","[","2",",","2",",","2",",","2","]",".","stage4_num_channels","(","list","[","int","]",",","optional",")",":","Number","of","channels","per","branch","for","stage4",".","Default",":","[","32",",","64",",","128",",","256","]",".","stage4_num_heads","(","list","[","int","]",",","optional",")",":","Number","of","heads","per","multi","head","attetion","for","stage4",".","Default",":","[","1",",","2",",","4",",","8","]",".","stage4_num_mlp_ratios","(","list","[","int","]",",","optional",")",":","Number","of","ratio","of","mlp","per","multi","head","attetion","for","stage4",".","Default",":","[","4",",","4",",","4",",","4","]",".","stage4_num_window_sizes","(","list","[","int","]",",","optional",")",":","Number","of","window","sizes","for","stage4",".","Default",":","[","7",",","7",",","7",",","7","]",".","in_channels","(","int",",","optional",")",":","The","channels","of","input","image",".","Default",":","3.","pretrained","(","str",",","optional",")",":","The","path","of","pretrained","model",".","Default",":","None","."]
code: def forward(self, x):
      x = self.conv1(x)
      x = self.conv2(x)
      x = self.layer1(x)
  
      x_list = []
      for i in range(self.stage2_num_branches):
          if self.transition1[i] is not None:
              x_list.append(self.transition1[i](x))
          else:
              x_list.append(x)
      y_list = self.stage2(x_list)
  
      x_list = []
      for i in range(self.stage3_num_branches):
          if self.transition2[i] is not None:
              x_list.append(self.transition2[i](y_list[-1]))
          else:
              x_list.append(y_list[i])
      y_list = self.stage3(x_list)
  
      x_list = []
      for i in range(self.stage4_num_branches):
          if self.transition3[i] is not None:
              x_list.append(self.transition3[i](y_list[-1]))
          else:
              x_list.append(y_list[i])
      y_list = self.stage4(x_list)
      _, _, h, w = y_list[0].shape
      feat1 = y_list[0]
      feat2 = F.interpolate(
          y_list[1], size=(h, w), mode="bilinear", align_corners=True
      )
      feat3 = F.interpolate(
          y_list[2], size=(h, w), mode="bilinear", align_corners=True
      )
      feat4 = F.interpolate(
          y_list[3], size=(h, w), mode="bilinear", align_corners=True
      )
  
      feats = paddle.concat([feat1, feat2, feat3, feat4], axis=1)
  
      return [feats]
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
  from paddleseg.utils import utils, logger
  from paddleseg.models.backbones.transformer_utils import *
label_desc: Use image node_id 6 for calling the HighResolutionTransformer obj's underlying member method code with example usage: obj.forward(x) and returns: list