class_docstr: The head implementation of HamNet based on PaddlePaddle.
  The original article refers to Zhengyang Geng, et al. "Is Attention Better Than Matrix Decomposition?"
  (https://arxiv.org/abs/2109.04553.pdf)
  
  Args:
      in_channels (list[int]): The feature channels from backbone.
      num_classes (int): The unique number of target classes.
      channels (int, optional): The intermediate channel of LightHamHead. Default: 256.
      dropout_rate (float, optional): The rate of dropout. Default: 0.1.
      align_corners (bool, optional): Whether use align_corners when interpolating. Default: False.
      ham_channels (int, optional): Input channel of Hamburger. Default: 512.
      num_groups (int, optional): The num_groups of convolutions in LightHamHead. Default: 32.
      ham_kwargs (dict, optional): Keyword arguments of Hamburger module.
class_docstr_tok: ["The","head","implementation","of","HamNet","based","on","PaddlePaddle",".","The","original","article","refers","to","Zhengyang","Geng",",","et","al",".","``","Is","Attention","Better","Than","Matrix","Decomposition","?","''","(","https",":","\/\/arxiv.org\/abs\/2109.04553.pdf",")","Args",":","in_channels","(","list","[","int","]",")",":","The","feature","channels","from","backbone",".","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","channels","(","int",",","optional",")",":","The","intermediate","channel","of","LightHamHead",".","Default",":","256.","dropout_rate","(","float",",","optional",")",":","The","rate","of","dropout",".","Default",":","0.1.","align_corners","(","bool",",","optional",")",":","Whether","use","align_corners","when","interpolating",".","Default",":","False",".","ham_channels","(","int",",","optional",")",":","Input","channel","of","Hamburger",".","Default",":","512.","num_groups","(","int",",","optional",")",":","The","num_groups","of","convolutions","in","LightHamHead",".","Default",":","32.","ham_kwargs","(","dict",",","optional",")",":","Keyword","arguments","of","Hamburger","module","."]
code: def forward(self, inputs):
      inputs = inputs[1:]
      target_shape = paddle.shape(inputs[0])[2:]
      inputs = [
          F.interpolate(
              level,
              size=target_shape,
              mode="bilinear",
              align_corners=self.align_corners,
          )
          for level in inputs
      ]
  
      inputs = paddle.concat(inputs, axis=1)
      x = self.squeeze(inputs)
  
      x = self.hamburger(x)
  
      output = self.align(x)
      output = self.dropout(output)
      output = self.conv_seg(output)
      return output
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models.backbones.mscan import MSCAN
  from paddleseg.models.layers import NMF2D, ConvGNAct
  from paddleseg.utils import utils
label_desc: Use image node_id 2 for calling the LightHamHead obj's underlying member method code with example usage: obj.forward(inputs) and returns: output