code: def __init__(
      self,
      in_ch,
      out_ch,
      k=(3, 5, 7),
      stride=1,
      dilation=1,
      bias=True,
      method="equal_params",
  ):
      super(MixConv2d, self).__init__()
  
      groups = len(k)
      if method == "equal_ch":  # equal channels per group
          i = torch.linspace(
              0, groups - 1e-6, out_ch
          ).floor()  # out_ch indices
          ch = [(i == g).sum() for g in range(groups)]
      else:  # 'equal_params': equal parameter count per group
          b = [out_ch] + [0] * groups
          a = np.eye(groups + 1, groups, k=-1)
          a -= np.roll(a, 1, axis=1)
          a *= np.array(k) ** 2
          a[0] = 1
          ch = (
              np.linalg.lstsq(a, b, rcond=None)[0].round().astype(int)
          )  # solve for equal weight indices, ax = b
  
      self.m = nn.ModuleList(
          [
              nn.Conv2d(
                  in_channels=in_ch,
                  out_channels=ch[g],
                  kernel_size=k[g],
                  stride=stride,
                  padding=k[g] // 2,  # 'same' pad
                  dilation=dilation,
                  bias=bias,
              )
              for g in range(groups)
          ]
      )
  
imports: import torch.nn.functional
  from .utils import *
label_desc: Use image node_id 1 to create a new MixConv2d object from inherited base classes: nn with example: obj = MixConv2d(in_ch, out_ch, k, stride, dilation, bias, method)