class_docstr: The HRNet implementation based on PaddlePaddle.
  The difference from HRNet at paddleseg/models/backbones/hrnet.py is
      1. The padding parameter of convolution is different.
  
  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:
      pretrained (str): The path of pretrained model.
      stage1_num_modules (int): Number of modules for stage1. Default 1.
      stage1_num_blocks (list): Number of blocks per module for stage1. Default [4].
      stage1_num_channels (list): Number of channels per branch for stage1. Default [64].
      stage2_num_modules (int): Number of modules for stage2. Default 1.
      stage2_num_blocks (list): Number of blocks per module for stage2. Default [4, 4]
      stage2_num_channels (list): Number of channels per branch for stage2. Default [18, 36].
      stage3_num_modules (int): Number of modules for stage3. Default 4.
      stage3_num_blocks (list): Number of blocks per module for stage3. Default [4, 4, 4]
      stage3_num_channels (list): Number of channels per branch for stage3. Default [18, 36, 72].
      stage4_num_modules (int): Number of modules for stage4. Default 3.
      stage4_num_blocks (list): Number of blocks per module for stage4. Default [4, 4, 4, 4]
      stage4_num_channels (list): Number of channels per branch for stage4. Default [18, 36, 72. 144].
      has_se (bool): Whether to use Squeeze-and-Excitation module. Default False.
      in_channels (int, optional): The channels of input image. Default: 3
      align_corners (bool, optional): An argument of F.interpolate. It should be set to False when the feature size is even,
          e.g. 1024x512, otherwise it is True, e.g. 769x769. Default: False.
class_docstr_tok: ["The","HRNet","implementation","based","on","PaddlePaddle",".","The","difference","from","HRNet","at","paddleseg\/models\/backbones\/hrnet.py","is","1",".","The","padding","parameter","of","convolution","is","different",".","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",":","pretrained","(","str",")",":","The","path","of","pretrained","model",".","stage1_num_modules","(","int",")",":","Number","of","modules","for","stage1",".","Default","1.","stage1_num_blocks","(","list",")",":","Number","of","blocks","per","module","for","stage1",".","Default","[","4","]",".","stage1_num_channels","(","list",")",":","Number","of","channels","per","branch","for","stage1",".","Default","[","64","]",".","stage2_num_modules","(","int",")",":","Number","of","modules","for","stage2",".","Default","1.","stage2_num_blocks","(","list",")",":","Number","of","blocks","per","module","for","stage2",".","Default","[","4",",","4","]","stage2_num_channels","(","list",")",":","Number","of","channels","per","branch","for","stage2",".","Default","[","18",",","36","]",".","stage3_num_modules","(","int",")",":","Number","of","modules","for","stage3",".","Default","4.","stage3_num_blocks","(","list",")",":","Number","of","blocks","per","module","for","stage3",".","Default","[","4",",","4",",","4","]","stage3_num_channels","(","list",")",":","Number","of","channels","per","branch","for","stage3",".","Default","[","18",",","36",",","72","]",".","stage4_num_modules","(","int",")",":","Number","of","modules","for","stage4",".","Default","3.","stage4_num_blocks","(","list",")",":","Number","of","blocks","per","module","for","stage4",".","Default","[","4",",","4",",","4",",","4","]","stage4_num_channels","(","list",")",":","Number","of","channels","per","branch","for","stage4",".","Default","[","18",",","36",",","72",".","144","]",".","has_se","(","bool",")",":","Whether","to","use","Squeeze-and-Excitation","module",".","Default","False",".","in_channels","(","int",",","optional",")",":","The","channels","of","input","image",".","Default",":","3","align_corners","(","bool",",","optional",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","feature","size","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769",".","Default",":","False","."]
code: def __init__(
      self,
      pretrained=None,
      stage1_num_modules=1,
      stage1_num_blocks=[4],
      stage1_num_channels=[64],
      stage2_num_modules=1,
      stage2_num_blocks=[4, 4],
      stage2_num_channels=[18, 36],
      stage3_num_modules=4,
      stage3_num_blocks=[4, 4, 4],
      stage3_num_channels=[18, 36, 72],
      stage4_num_modules=3,
      stage4_num_blocks=[4, 4, 4, 4],
      stage4_num_channels=[18, 36, 72, 144],
      has_se=False,
      in_channels=3,
      align_corners=False,
  ):
      super(HRNetNV, self).__init__()
      self.pretrained = pretrained
      self.stage1_num_modules = stage1_num_modules
      self.stage1_num_blocks = stage1_num_blocks
      self.stage1_num_channels = stage1_num_channels
      self.stage2_num_modules = stage2_num_modules
      self.stage2_num_blocks = stage2_num_blocks
      self.stage2_num_channels = stage2_num_channels
      self.stage3_num_modules = stage3_num_modules
      self.stage3_num_blocks = stage3_num_blocks
      self.stage3_num_channels = stage3_num_channels
      self.stage4_num_modules = stage4_num_modules
      self.stage4_num_blocks = stage4_num_blocks
      self.stage4_num_channels = stage4_num_channels
      self.has_se = has_se
      self.align_corners = align_corners
      self.feat_channels = [sum(stage4_num_channels)]
  
      self.conv_layer1_1 = layers.ConvBNReLU(
          in_channels=in_channels,
          out_channels=64,
          kernel_size=3,
          stride=2,
          padding=1,
          bias_attr=False,
      )
  
      self.conv_layer1_2 = layers.ConvBNReLU(
          in_channels=64,
          out_channels=64,
          kernel_size=3,
          stride=2,
          padding=1,
          bias_attr=False,
      )
  
      self.la1 = Layer1(
          num_channels=64,
          num_blocks=self.stage1_num_blocks[0],
          num_filters=self.stage1_num_channels[0],
          has_se=has_se,
          name="layer2",
      )
  
      self.tr1 = TransitionLayer(
          in_channels=[self.stage1_num_channels[0] * 4],
          out_channels=self.stage2_num_channels,
          name="tr1",
      )
  
      self.st2 = Stage(
          num_channels=self.stage2_num_channels,
          num_modules=self.stage2_num_modules,
          num_blocks=self.stage2_num_blocks,
          num_filters=self.stage2_num_channels,
          has_se=self.has_se,
          name="st2",
          align_corners=align_corners,
      )
  
      self.tr2 = TransitionLayer(
          in_channels=self.stage2_num_channels,
          out_channels=self.stage3_num_channels,
          name="tr2",
      )
      self.st3 = Stage(
          num_channels=self.stage3_num_channels,
          num_modules=self.stage3_num_modules,
          num_blocks=self.stage3_num_blocks,
          num_filters=self.stage3_num_channels,
          has_se=self.has_se,
          name="st3",
          align_corners=align_corners,
      )
  
      self.tr3 = TransitionLayer(
          in_channels=self.stage3_num_channels,
          out_channels=self.stage4_num_channels,
          name="tr3",
      )
      self.st4 = Stage(
          num_channels=self.stage4_num_channels,
          num_modules=self.stage4_num_modules,
          num_blocks=self.stage4_num_blocks,
          num_filters=self.stage4_num_channels,
          has_se=self.has_se,
          name="st4",
          align_corners=align_corners,
      )
      self.init_weight()
  
imports: import math
  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
label_desc: Use image node_id 1 to create a new HRNetNV object from inherited base classes: nn with example: obj = HRNetNV(pretrained, stage1_num_modules, stage1_num_blocks, stage1_num_channels, stage2_num_modules, stage2_num_blocks, stage2_num_channels, stage3_num_modules, stage3_num_blocks, stage3_num_channels, stage4_num_modules, stage4_num_blocks, stage4_num_channels, has_se, in_channels, align_corners)