class_docstr: Global feature extractor module.
  This module consists of three InvertedBottleneck blocks (like inverted residual introduced by MobileNetV2) and
  a PPModule (introduced by PSPNet).
  Args:
      in_channels (int): The number of input channels to the module.
      block_channels (tuple): A tuple represents output channels of each bottleneck block.
      out_channels (int): The number of output channels of the module. Default:
      expansion (int): The expansion factor in bottleneck.
      num_blocks (tuple): It indicates the repeat time of each bottleneck.
      align_corners (bool): An argument of F.interpolate. It should be set to False when the output size of feature
          is even, e.g. 1024x512, otherwise it is True, e.g. 769x769.
class_docstr_tok: ["Global","feature","extractor","module",".","This","module","consists","of","three","InvertedBottleneck","blocks","(","like","inverted","residual","introduced","by","MobileNetV2",")","and","a","PPModule","(","introduced","by","PSPNet",")",".","Args",":","in_channels","(","int",")",":","The","number","of","input","channels","to","the","module",".","block_channels","(","tuple",")",":","A","tuple","represents","output","channels","of","each","bottleneck","block",".","out_channels","(","int",")",":","The","number","of","output","channels","of","the","module",".","Default",":","expansion","(","int",")",":","The","expansion","factor","in","bottleneck",".","num_blocks","(","tuple",")",":","It","indicates","the","repeat","time","of","each","bottleneck",".","align_corners","(","bool",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","output","size","of","feature","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769","."]
code: def __init__(
      self,
      in_channels: int,
      block_channels: int,
      out_channels: int,
      expansion: int,
      num_blocks: Tuple[int],
      align_corners: bool,
  ):
      super(GlobalFeatureExtractor, self).__init__()
  
      self.bottleneck1 = self._make_layer(
          InvertedBottleneck,
          in_channels,
          block_channels[0],
          num_blocks[0],
          expansion,
          2,
      )
      self.bottleneck2 = self._make_layer(
          InvertedBottleneck,
          block_channels[0],
          block_channels[1],
          num_blocks[1],
          expansion,
          2,
      )
      self.bottleneck3 = self._make_layer(
          InvertedBottleneck,
          block_channels[1],
          block_channels[2],
          num_blocks[2],
          expansion,
          1,
      )
  
      self.ppm = layers.PPModule(
          block_channels[2],
          out_channels,
          bin_sizes=(1, 2, 3, 6),
          dim_reduction=True,
          align_corners=align_corners,
      )
  
imports: import os
  from typing import Callable, Union, Tuple
  import paddle.nn
  import paddle.nn.functional
  import paddle
  import numpy
  from paddlehub.module.module import moduleinfo
  import paddlehub.vision.segmentation_transforms
  from paddlehub.module.cv_module import ImageSegmentationModule
  import fastscnn_cityscapes.layers
label_desc: Use image node_id 1 to create a new GlobalFeatureExtractor object from inherited base classes: nn with example: obj = GlobalFeatureExtractor(in_channels, block_channels, out_channels, expansion, num_blocks, align_corners)