code: def __init__(self, block_args):
      super(MbConvBlock, self).__init__()
      self._block_args = block_args
      self.has_se = (self._block_args.se_ratio is not None) and (
          0 < self._block_args.se_ratio <= 1
      )
      self.id_skip = block_args.id_skip
  
      # expansion phase
      self.inp = self._block_args.input_filters
      oup = (
          self._block_args.input_filters * self._block_args.expand_ratio
      )
      if self._block_args.expand_ratio != 1:
          self._expand_conv = nn.Conv2D(
              self.inp, oup, 1, bias_attr=False
          )
          self._bn0 = nn.BatchNorm(oup)
  
      # depthwise conv phase
      k = self._block_args.kernel_size
      s = self._block_args.stride
      if isinstance(s, list):
          s = s[0]
      self._depthwise_conv = nn.Conv2D(
          oup,
          oup,
          groups=oup,
          kernel_size=k,
          stride=s,
          padding="same",
          bias_attr=False,
      )
      self._bn1 = nn.BatchNorm(oup)
  
      # squeeze and excitation layer, if desired
      if self.has_se:
          num_squeezed_channels = max(
              1,
              int(
                  self._block_args.input_filters
                  * self._block_args.se_ratio
              ),
          )
          self._se_reduce = nn.Conv2D(oup, num_squeezed_channels, 1)
          self._se_expand = nn.Conv2D(num_squeezed_channels, oup, 1)
  
      # output phase and some util class
      self.final_oup = self._block_args.output_filters
      self._project_conv = nn.Conv2D(
          oup, self.final_oup, 1, bias_attr=False
      )
      self._bn2 = nn.BatchNorm(self.final_oup)
      self._swish = nn.Swish()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import re
  import collections
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 1 to create a new MbConvBlock object from inherited base classes: nn with example: obj = MbConvBlock(block_args)