class_docstr: This class implements the inverted residual block, as described in `MobileNetv2 <https://arxiv.org/abs/1801.04381>`_ paper
  
  Args:
      opts: command-line arguments
      in_channels (int): :math:`C_{in}` from an expected input of size :math:`(N, C_{in}, H_{in}, W_{in})`
      out_channels (int): :math:`C_{out}` from an expected output of size :math:`(N, C_{out}, H_{out}, W_{out)`
      stride (Optional[int]): Use convolutions with a stride. Default: 1
      expand_ratio (Union[int, float]): Expand the input channels by this factor in depth-wise conv
      dilation (Optional[int]): Use conv with dilation. Default: 1
      skip_connection (Optional[bool]): Use skip-connection. Default: True
  
  Shape:
      - Input: :math:`(N, C_{in}, H_{in}, W_{in})`
      - Output: :math:`(N, C_{out}, H_{out}, W_{out})`
  
  .. note::
      If `in_channels =! out_channels` and `stride > 1`, we set `skip_connection=False`
code: def forward(self, x: Tensor, *args, **kwargs) -> Tensor:
      if self.use_res_connect:
          return x + self.block(x)
      else:
          return self.block(x)
  
file_path: ml-cvnets/cvnets/modules/mobilenetv2.py
imports: from typing import Optional, Union
  from torch import Tensor, nn
  from cvnets.layers import ConvLayer2d
  from cvnets.layers.activation import build_activation_layer
  from cvnets.modules import BaseModule, SqueezeExcitation
  from utils.math_utils import make_divisible
label_desc: Use image node_id 2 for calling the InvertedResidual obj's underlying member method code with example usage: obj.forward(x) and returns: unknown, self