class_docstr: The GloRe implementation based on PaddlePaddle.
  
  The original article refers to:
     Chen, Yunpeng, et al. "Graph-Based Global Reasoning Networks"
     (https://arxiv.org/pdf/1811.12814.pdf)
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone (Paddle.nn.Layer): Backbone network, currently support Resnet50/101.
      backbone_indices (tuple, optional): Two values in the tuple indicate the indices of output of backbone.
      gru_channels (int, optional): The number of input channels in GloRe Unit. Default: 512.
      gru_num_state (int, optional): The number of states in GloRe Unit. Default: 128.
      gru_num_node (tuple, optional): The number of nodes in GloRe Unit. Default: Default: 128.
      enable_auxiliary_loss (bool, optional): A bool value indicates whether adding auxiliary loss. Default: True.
      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.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
code: def __init__(
      self,
      num_classes,
      backbone,
      backbone_indices=(2, 3),
      gru_channels=512,
      gru_num_state=128,
      gru_num_node=64,
      enable_auxiliary_loss=True,
      align_corners=False,
      pretrained=None,
  ):
      super().__init__()
  
      self.backbone = backbone
      backbone_channels = [
          backbone.feat_channels[i] for i in backbone_indices
      ]
  
      self.head = GloReHead(
          num_classes,
          backbone_indices,
          backbone_channels,
          gru_channels,
          gru_num_state,
          gru_num_node,
          enable_auxiliary_loss,
      )
      self.align_corners = align_corners
      self.pretrained = pretrained
      self.init_weight()
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new GloRe object from inherited base classes: nn with example: obj = GloRe(num_classes, backbone, backbone_indices, gru_channels, gru_num_state, gru_num_node, enable_auxiliary_loss, align_corners, pretrained)