class_docstr: The Bilateral Guided Aggregation Layer, used to fuse the semantic features and spatial features.
class_docstr_tok: ["The","Bilateral","Guided","Aggregation","Layer",",","used","to","fuse","the","semantic","features","and","spatial","features","."]
code: def __init__(self, out_dim: int, align_corners: bool):
      super().__init__()
  
      self.align_corners = align_corners
  
      self.db_branch_keep = nn.Sequential(
          layers.DepthwiseConvBN(out_dim, out_dim, 3),
          nn.Conv2D(out_dim, out_dim, 1),
      )
  
      self.db_branch_down = nn.Sequential(
          layers.ConvBN(out_dim, out_dim, 3, stride=2),
          nn.AvgPool2D(kernel_size=3, stride=2, padding=1),
      )
  
      self.sb_branch_keep = nn.Sequential(
          layers.DepthwiseConvBN(out_dim, out_dim, 3),
          nn.Conv2D(out_dim, out_dim, 1),
          layers.Activation(act="sigmoid"),
      )
  
      self.sb_branch_up = layers.ConvBN(out_dim, out_dim, 3)
  
      self.conv = layers.ConvBN(out_dim, out_dim, 3)
  
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
  import bisenet_cityscapes.layers
label_desc: Use image node_id 1 to create a new BGA object from inherited base classes: nn with example: obj = BGA(out_dim, align_corners)