code: def get_mnet_conv(data, sym):
      mm = config.MULTIPLIER
      all_layers = sym.get_internals()
      # print(all_layers)
      ##c1 = all_layers['mobilenetv20_features_linearbottleneck6_relu60_relu6_output'] #96
      # c1 = all_layers['mobilenetv20_features_linearbottleneck5_elemwise_add0_output'] # 16
      ##c2 = all_layers['mobilenetv20_features_linearbottleneck13_relu60_relu6_output']
      # c2 = all_layers['mobilenetv20_features_linearbottleneck12_elemwise_add0_output'] # 48
      ##c3 = all_layers['mobilenetv20_features_linearbottleneck16_batchnorm2_fwd_output'] # 160
      # c3 = all_layers['mobilenetv20_features_linearbottleneck13_batchnorm2_fwd_output'] # 80
      # c1_filter = int(32*mm)
      # c2_filter = int(96*mm)
      # c3_filter = int(160*mm)
  
      # c1 = all_layers['mobilenet0_relu10_fwd_output']
      # c2 = all_layers['mobilenet0_relu22_fwd_output']
      # c3 = all_layers['mobilenet0_relu26_fwd_output']
  
      # c1 = all_layers['conv_6_relu_output']
      # c2 = all_layers['conv_12_relu_output']
      # c3 = all_layers['conv_14_relu_output']
      # c1_filter = int(256*mm)
      # c2_filter = int(512*mm)
      # c3_filter = int(1024*mm)
  
      isize = 640
      _, out_shape, _ = all_layers.infer_shape(
          data=(1, 3, isize, isize)
      )
      last_entry = None
      c1 = None
      c2 = None
      c3 = None
      c1_name = None
      c2_name = None
      c3_name = None
      c1_filter = -1
      c2_filter = -1
      c3_filter = -1
      # print(len(all_layers), len(out_shape))
      # print(all_layers.__class__)
      outputs = all_layers.list_outputs()
      # print(outputs.__class__, len(outputs))
      count = len(outputs)
      for i in range(count):
          name = outputs[i]
          shape = out_shape[i]
          if not name.endswith("_output"):
              continue
          if len(shape) != 4:
              continue
          # print(name, shape)
          if c1 is None and shape[2] == isize // 16:
              cname = last_entry[0]
              # print('c1', last_entry)
              c1 = all_layers[cname]
              c1_name = cname
          if c2 is None and shape[2] == isize // 32:
              cname = last_entry[0]
              # print('c2', last_entry)
              c2 = all_layers[cname]
              c2_name = cname
          if shape[2] == isize // 32:
              c3 = all_layers[name]
              # print('c3', name, shape)
              c3_name = name
  
          last_entry = (name, shape)
      print("cnames", c1_name, c2_name, c3_name)
  
      F1 = int(256 * mm)
      F2 = int(128 * mm)
      if config.SHARE_WEIGHT_BBOX or config.SHARE_WEIGHT_LANDMARK:
          F2 = F1
      _bwm = 1.0
      if config.NET_MODE == 0:
          c1_lateral = conv_act_layer(
              c1,
              "ssh_m1_red_conv",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c2_lateral = conv_act_layer(
              c2,
              "ssh_m2_red_conv",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # conv5_128_up = mx.symbol.Deconvolution(data=conv5_128, num_filter=F2, kernel=(4,4),  stride=(2, 2), pad=(1,1),
          #    num_group = F2, no_bias = True, attr={'__lr_mult__': '0.0', '__wd_mult__': '0.0'},
          #    name='ssh_m2_red_upsampling')
          # c2_up = mx.symbol.UpSampling(c2_lateral, scale=2, sample_type='nearest', workspace=512, name='ssh_m2_red_up', num_args=1)
          c2_up = upsampling(c2_lateral, F2, "ssh_m2_red_upsampling")
          # conv4_128 = mx.symbol.Crop(*[conv4_128, conv5_128_up])
          c2_up = mx.symbol.Crop(*[c2_up, c1_lateral])
  
          c1 = c1_lateral + c2_up
  
          c1 = conv_act_layer(
              c1,
              "ssh_m1_conv",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          m1 = ssh_detection_module(c1, F2, F2, "ssh_m1_det")
          m2 = ssh_detection_module(c2, F1, c2_filter, "ssh_m2_det")
          m3 = ssh_detection_module(c3, F1, c3_filter, "ssh_m3_det")
      elif config.NET_MODE == 1:
          c3_lateral = conv_act_layer(
              c3,
              "ssh_c3_lateral",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c3_up = mx.symbol.UpSampling(c3_lateral, scale=2, sample_type='nearest', workspace=512, name='ssh_c3_up', num_args=1)
          c3_up = upsampling(c3_lateral, F2, "ssh_c3_upsampling")
          c2_lateral = conv_act_layer(
              c2,
              "ssh_c2_lateral",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c3_up = mx.symbol.Crop(*[c3_up, c2_lateral])
          c2 = c2_lateral + c3_up
          c2 = conv_act_layer(
              c2,
              "ssh_c2_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c1_lateral = conv_act_layer(
              c1,
              "ssh_m1_red_conv",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c2_up = mx.symbol.UpSampling(c2, scale=2, sample_type='nearest', workspace=512, name='ssh_m2_red_up', num_args=1)
          c2_up = upsampling(c2, F2, "ssh_c2_upsampling")
          # conv4_128 = mx.symbol.Crop(*[conv4_128, conv5_128_up])
          c2_up = mx.symbol.Crop(*[c2_up, c1_lateral])
  
          c1 = c1_lateral + c2_up
  
          c1 = conv_act_layer(
              c1,
              "ssh_m1_conv",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          m1 = ssh_detection_module(c1, F2, F2, "ssh_m1_det")
          m2 = ssh_detection_module(c2, F1, c2_filter, "ssh_m2_det")
          m3 = ssh_detection_module(c3, F1, c3_filter, "ssh_m3_det")
      elif config.NET_MODE == 2:
          c3 = conv_act_layer(
              c3,
              "ssh_c3_lateral",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c3_up = mx.symbol.UpSampling(c3, scale=2, sample_type='nearest', workspace=512, name='ssh_c3_up', num_args=1)
          c3_up = upsampling(c3, F2, "ssh_c3_upsampling")
          c2_lateral = conv_act_layer(
              c2,
              "ssh_c2_lateral",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c3_up = mx.symbol.Crop(*[c3_up, c2_lateral])
          c2 = c2_lateral + c3_up
          c2 = conv_act_layer(
              c2,
              "ssh_c2_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c1_lateral = conv_act_layer(
              c1,
              "ssh_m1_red_conv",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c2_up = mx.symbol.UpSampling(c2, scale=2, sample_type='nearest', workspace=512, name='ssh_m2_red_up', num_args=1)
          c2_up = upsampling(c2, F2, "ssh_c2_upsampling")
          # conv4_128 = mx.symbol.Crop(*[conv4_128, conv5_128_up])
          c2_up = mx.symbol.Crop(*[c2_up, c1_lateral])
          c1 = c1_lateral + c2_up
          c1 = conv_act_layer(
              c1,
              "ssh_c1_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
  
          m1 = ssh_detection_module(c1, F2, F2, "ssh_m1_det")
          m2 = ssh_detection_module(c2, F1, c2_filter, "ssh_m2_det")
          m3 = ssh_detection_module(c3, F1, c3_filter, "ssh_m3_det")
      elif config.NET_MODE == 3:
          # c3 = conv_act_layer(c3, 'ssh_c3_lateral',
          #    F2, kernel=(1, 1), pad=(0, 0), stride=(1, 1), act_type='relu', bias_wd_mult=_bwm)
          c3 = ssh_detection_module(
              c3, F2 // 2, c3_filter, "ssh_c3_lateral"
          )
          # c3_up = mx.symbol.UpSampling(c3, scale=2, sample_type='nearest', workspace=512, name='ssh_c3_up', num_args=1)
          c3_up = upsampling(c3, F2, "ssh_c3_upsampling")
          # c2_lateral = conv_act_layer(c2, 'ssh_c2_lateral',
          #    F2, kernel=(1, 1), pad=(0, 0), stride=(1, 1), act_type='relu', bias_wd_mult=_bwm)
          c2_lateral = ssh_detection_module(
              c2, F2 // 2, c2_filter, "ssh_c2_lateral"
          )
          c3_up = mx.symbol.Crop(*[c3_up, c2_lateral])
          c2 = c2_lateral + c3_up
          c2 = conv_act_layer(
              c2,
              "ssh_c2_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c1_lateral = conv_act_layer(c1, 'ssh_m1_red_conv',
          #    F2, kernel=(1, 1), pad=(0, 0), stride=(1, 1), act_type='relu', bias_wd_mult=_bwm)
          c1_lateral = ssh_detection_module(
              c1, F2 // 2, c1_filter, "ssh_c1_lateral"
          )
          # c2_up = mx.symbol.UpSampling(c2, scale=2, sample_type='nearest', workspace=512, name='ssh_m2_red_up', num_args=1)
          c2_up = upsampling(c2, F2, "ssh_c2_upsampling")
          # conv4_128 = mx.symbol.Crop(*[conv4_128, conv5_128_up])
          c2_up = mx.symbol.Crop(*[c2_up, c1_lateral])
          c1 = c1_lateral + c2_up
          c1 = conv_act_layer(
              c1,
              "ssh_c1_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
  
          m1 = ssh_detection_module(c1, F2, F2, "ssh_m1_det")
          m2 = ssh_detection_module(c2, F1, c2_filter, "ssh_m2_det")
          m3 = ssh_detection_module(c3, F1, c3_filter, "ssh_m3_det")
      elif config.NET_MODE == 4:
          c3 = conv_act_layer(
              c3,
              "ssh_c3_lateral",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c3_up = mx.symbol.UpSampling(c3, scale=2, sample_type='nearest', workspace=512, name='ssh_c3_up', num_args=1)
          c3_up = upsampling(c3, F2, "ssh_c3_upsampling")
          c2_lateral = conv_act_layer(
              c2,
              "ssh_c2_lateral",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c3_up = mx.symbol.Crop(*[c3_up, c2_lateral])
          c2 = c2_lateral + c3_up
          c2 = conv_act_layer(
              c2,
              "ssh_c2_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c1_lateral = conv_act_layer(
              c1,
              "ssh_m1_red_conv",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c2_up = mx.symbol.UpSampling(c2, scale=2, sample_type='nearest', workspace=512, name='ssh_m2_red_up', num_args=1)
          c2_up = upsampling(c2, F2, "ssh_c2_upsampling")
          # conv4_128 = mx.symbol.Crop(*[conv4_128, conv5_128_up])
          c2_up = mx.symbol.Crop(*[c2_up, c1_lateral])
          c1 = c1_lateral + c2_up
          c1 = conv_act_layer(
              c1,
              "ssh_c1_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
  
          m1 = ssh_detection_module(c1, F2 // 2, F2, "ssh_m1_det")
          m2 = ssh_detection_module(
              c2, F1 // 2, c2_filter, "ssh_m2_det"
          )
          m3 = ssh_detection_module(
              c3, F1 // 2, c3_filter, "ssh_m3_det"
          )
      elif config.NET_MODE == 5:
          c3 = conv_act_layer_dw(
              c3,
              "ssh_c3_lateral_m",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c3 = conv_act_layer(
              c3,
              "ssh_c3_lateral",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c3_up = mx.symbol.UpSampling(c3, scale=2, sample_type='nearest', workspace=512, name='ssh_c3_up', num_args=1)
          c3_up = upsampling(c3, F2, "ssh_c3_upsampling")
          c2 = conv_act_layer_dw(
              c2,
              "ssh_c2_lateral_m",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c2_lateral = conv_act_layer(
              c2,
              "ssh_c2_lateral",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c3_up = mx.symbol.Crop(*[c3_up, c2_lateral])
          c2 = c2_lateral + c3_up
          c2 = conv_act_layer(
              c2,
              "ssh_c2_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c1 = conv_act_layer_dw(
              c1,
              "ssh_c1_lateral_m",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          c1_lateral = conv_act_layer(
              c1,
              "ssh_m1_red_conv",
              F2,
              kernel=(1, 1),
              pad=(0, 0),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
          # c2_up = mx.symbol.UpSampling(c2, scale=2, sample_type='nearest', workspace=512, name='ssh_m2_red_up', num_args=1)
          c2_up = upsampling(c2, F2, "ssh_c2_upsampling")
          # conv4_128 = mx.symbol.Crop(*[conv4_128, conv5_128_up])
          c2_up = mx.symbol.Crop(*[c2_up, c1_lateral])
          c1 = c1_lateral + c2_up
          c1 = conv_act_layer(
              c1,
              "ssh_c1_aggr",
              F2,
              kernel=(3, 3),
              pad=(1, 1),
              stride=(1, 1),
              act_type="relu",
              bias_wd_mult=_bwm,
          )
  
          m1 = ssh_detection_module(c1, F2, F2, "ssh_m1_det")
          m2 = ssh_detection_module(c2, F1, c2_filter, "ssh_m2_det")
          m3 = ssh_detection_module(c3, F1, c3_filter, "ssh_m3_det")
  
      return {8: m1, 16: m2, 32: m3}
  
file_path: insightface/detection/retinaface/rcnn/symbol/symbol_mnet.py
imports: import mxnet
  import mxnet.ndarray
  import mxnet.gluon
  import mxnet.gluon.nn
  import mxnet.autograd
  import numpy
  from rcnn.config import config
  from rcnn.PY_OP import rpn_fpn_ohem3
  from rcnn.symbol.symbol_common import get_sym_train
label_desc: Use image node_id 7 for calling a global function with example usage: get_mnet_conv(data, sym) and returns: dict