class_docstr: The ISAHead.
  
  Args:
      num_classes (int): The unique number of target classes.
      in_channels (tuple): The number of input channels.
      isa_channels (int): The channels of ISA Module.
      down_factor (tuple): Divide the height and width dimension to (Ph, PW) groups.
      enable_auxiliary_loss (bool, optional): A bool value indicates whether adding auxiliary loss. Default: True.
class_docstr_tok: ["The","ISAHead",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","in_channels","(","tuple",")",":","The","number","of","input","channels",".","isa_channels","(","int",")",":","The","channels","of","ISA","Module",".","down_factor","(","tuple",")",":","Divide","the","height","and","width","dimension","to","(","Ph",",","PW",")","groups",".","enable_auxiliary_loss","(","bool",",","optional",")",":","A","bool","value","indicates","whether","adding","auxiliary","loss",".","Default",":","True","."]
code: def __init__(
      self,
      num_classes: int,
      in_channels: int,
      isa_channels: int,
      down_factor: Tuple[int],
      enable_auxiliary_loss: bool,
  ):
      super(ISAHead, self).__init__()
      self.in_channels = in_channels[-1]
      inter_channels = self.in_channels // 4
      self.inter_channels = inter_channels
      self.down_factor = down_factor
      self.enable_auxiliary_loss = enable_auxiliary_loss
      self.in_conv = layers.ConvBNReLU(
          self.in_channels, inter_channels, 3, bias_attr=False
      )
      self.global_relation = SelfAttentionBlock(
          inter_channels, isa_channels
      )
      self.local_relation = SelfAttentionBlock(
          inter_channels, isa_channels
      )
      self.out_conv = layers.ConvBNReLU(
          inter_channels * 2, inter_channels, 1, bias_attr=False
      )
      self.cls = nn.Sequential(
          nn.Dropout2D(p=0.1), nn.Conv2D(inter_channels, num_classes, 1)
      )
      self.aux = nn.Sequential(
          layers.ConvBNReLU(
              in_channels=1024,
              out_channels=256,
              kernel_size=3,
              bias_attr=False,
          ),
          nn.Dropout2D(p=0.1),
          nn.Conv2D(256, num_classes, 1),
      )
  
imports: import os
  from typing import Union, List, Tuple
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddlehub.module.module import moduleinfo
  import paddlehub.vision.segmentation_transforms
  from paddlehub.module.cv_module import ImageSegmentationModule
  from isanet_resnet50_cityscapes.resnet import ResNet50_vd
  import isanet_resnet50_cityscapes.layers
label_desc: Use image node_id 1 to create a new ISAHead object from inherited base classes: nn with example: obj = ISAHead(num_classes, in_channels, isa_channels, down_factor, enable_auxiliary_loss)