code: def __init__(
      self,
      inp: int,
      oup: int,
      ks: int,
      stride: int,
      expand_ratio: int,
      activations=None,
  ):
      super().__init__()
  
      self.stride = stride
      self.expand_ratio = expand_ratio
      assert stride in [1, 2]
  
      if activations is None:
          activations = nn.ReLU
  
      hidden_dim = int(round(inp * expand_ratio))
      self.use_res_connect = self.stride == 1 and inp == oup
  
      modules = []
      if expand_ratio != 1:
          modules.append(
              layers.ConvBN(inp, hidden_dim, 1, bias_attr=False)
          )
          modules.append(activations())
      modules.extend(
          [
              layers.ConvBN(
                  hidden_dim,
                  hidden_dim,
                  ks,
                  stride=stride,
                  padding=ks // 2,
                  groups=hidden_dim,
                  bias_attr=False,
              ),
              activations(),
              layers.ConvBN(hidden_dim, oup, 1, bias_attr=False),
          ]
      )
      self.conv = nn.Sequential(*modules)
      self.out_channels = oup
      self._is_cn = stride > 1
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
  from paddleseg.models.backbones.transformer_utils import DropPath, zeros_, ones_
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new InvertedResidual object from inherited base classes: nn with example: obj = InvertedResidual(inp, oup, ks, stride, expand_ratio, activations)