class_docstr: Single Inverted bottleneck implementation.
  Args:
      in_channels (int): The number of input channels to bottleneck block.
      out_channels (int): The number of output channels of bottleneck block.
      expansion (int, optional). The expansion factor in bottleneck. Default: 6.
      stride (int, optional). The stride used in depth-wise conv. Defalt: 2.
class_docstr_tok: ["Single","Inverted","bottleneck","implementation",".","Args",":","in_channels","(","int",")",":","The","number","of","input","channels","to","bottleneck","block",".","out_channels","(","int",")",":","The","number","of","output","channels","of","bottleneck","block",".","expansion","(","int",",","optional",")",".","The","expansion","factor","in","bottleneck",".","Default",":","6.","stride","(","int",",","optional",")",".","The","stride","used","in","depth-wise","conv",".","Defalt",":","2","."]
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      expansion: int = 6,
      stride: int = 2,
  ):
      super().__init__()
  
      self.use_shortcut = stride == 1 and in_channels == out_channels
  
      expand_channels = in_channels * expansion
      self.block = nn.Sequential(
          # pw
          layers.ConvBNReLU(
              in_channels=in_channels,
              out_channels=expand_channels,
              kernel_size=1,
              bias_attr=False,
          ),
          # dw
          layers.ConvBNReLU(
              in_channels=expand_channels,
              out_channels=expand_channels,
              kernel_size=3,
              stride=stride,
              padding=1,
              groups=expand_channels,
              bias_attr=False,
          ),
          # pw-linear
          layers.ConvBN(
              in_channels=expand_channels,
              out_channels=out_channels,
              kernel_size=1,
              bias_attr=False,
          ),
      )
  
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 InvertedBottleneck object from inherited base classes: nn with example: obj = InvertedBottleneck(in_channels, out_channels, expansion, stride)