class_docstr: the MicroNet backbone network for recognition module.
  Args:
      mode(str): {'M0', 'M1', 'M2', 'M3'} 
          Four models are proposed based on four different computational costs (4M, 6M, 12M, 21M MAdds)
          Default: 'M3'.
class_docstr_tok: ["the","MicroNet","backbone","network","for","recognition","module",".","Args",":","mode","(","str",")",":","{","'M0","'",",","'M1","'",",","'M2","'",",","'M3","'","}","Four","models","are","proposed","based","on","four","different","computational","costs","(","4M",",","6M",",","12M",",","21M","MAdds",")","Default",":","'M3","'","."]
code: def __init__(self, mode="M3", **kwargs):
      super(MicroNet, self).__init__()
  
      self.cfgs = get_micronet_config(mode)
  
      activation_cfg = {}
      if mode == "M0":
          input_channel = 4
          stem_groups = 2, 2
          out_ch = 384
          activation_cfg["init_a"] = 1.0, 1.0
          activation_cfg["init_b"] = 0.0, 0.0
      elif mode == "M1":
          input_channel = 6
          stem_groups = 3, 2
          out_ch = 576
          activation_cfg["init_a"] = 1.0, 1.0
          activation_cfg["init_b"] = 0.0, 0.0
      elif mode == "M2":
          input_channel = 8
          stem_groups = 4, 2
          out_ch = 768
          activation_cfg["init_a"] = 1.0, 1.0
          activation_cfg["init_b"] = 0.0, 0.0
      elif mode == "M3":
          input_channel = 12
          stem_groups = 4, 3
          out_ch = 432
          activation_cfg["init_a"] = 1.0, 0.5
          activation_cfg["init_b"] = 0.0, 0.5
      else:
          raise NotImplementedError(
              "mode[" + mode + "_model] is not implemented!"
          )
  
      layers = [
          StemLayer(3, input_channel, stride=2, groups=stem_groups)
      ]
  
      for idx, val in enumerate(self.cfgs):
          s, n, c, ks, c1, c2, g1, g2, c3, g3, g4, y1, y2, y3, r = val
  
          t1 = (c1, c2)
          gs1 = (g1, g2)
          gs2 = (c3, g3, g4)
          activation_cfg["dy"] = [y1, y2, y3]
          activation_cfg["ratio"] = r
  
          output_channel = c
          layers.append(
              DYMicroBlock(
                  input_channel,
                  output_channel,
                  kernel_size=ks,
                  stride=s,
                  ch_exp=t1,
                  ch_per_group=gs1,
                  groups_1x1=gs2,
                  depthsep=True,
                  shuffle=True,
                  activation_cfg=activation_cfg,
              )
          )
          input_channel = output_channel
          for i in range(1, n):
              layers.append(
                  DYMicroBlock(
                      input_channel,
                      output_channel,
                      kernel_size=ks,
                      stride=1,
                      ch_exp=t1,
                      ch_per_group=gs1,
                      groups_1x1=gs2,
                      depthsep=True,
                      shuffle=True,
                      activation_cfg=activation_cfg,
                  )
              )
              input_channel = output_channel
      self.features = nn.Sequential(*layers)
  
      self.pool = nn.MaxPool2D(kernel_size=2, stride=2, padding=0)
  
      self.out_channels = make_divisible(out_ch)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  from ppocr.modeling.backbones.det_mobilenet_v3 import make_divisible
label_desc: Use image node_id 1 to create a new MicroNet object from inherited base classes: nn with example: obj = MicroNet(mode)