class_docstr: Global Context Block implementation.
  
  Args:
      in_channels (int): The input channels of Global Context Block.
      ratio (float): The channels of attention map.
class_docstr_tok: ["Global","Context","Block","implementation",".","Args",":","in_channels","(","int",")",":","The","input","channels","of","Global","Context","Block",".","ratio","(","float",")",":","The","channels","of","attention","map","."]
code: def __init__(self, gc_channels, in_channels, ratio):
      super().__init__()
      self.gc_channels = gc_channels
  
      self.conv_mask = nn.Conv2D(
          in_channels=in_channels, out_channels=1, kernel_size=1
      )
  
      self.softmax = nn.Softmax(axis=2)
  
      inter_channels = int(in_channels * ratio)
      self.channel_add_conv = nn.Sequential(
          nn.Conv2D(
              in_channels=in_channels,
              out_channels=inter_channels,
              kernel_size=1,
          ),
          nn.LayerNorm(normalized_shape=[inter_channels, 1, 1]),
          nn.ReLU(),
          nn.Conv2D(
              in_channels=inter_channels,
              out_channels=in_channels,
              kernel_size=1,
          ),
      )
  
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 GlobalContextBlock object from inherited base classes: nn with example: obj = GlobalContextBlock(gc_channels, in_channels, ratio)