code: def conv_deformable(
      net, num_filter, num_group=1, act_type="relu", name=""
  ):
      if config.USE_DCN == 1:
          f = num_group * 18
          conv_offset = mx.symbol.Convolution(
              name=name + "_conv_offset",
              data=net,
              num_filter=f,
              pad=(1, 1),
              kernel=(3, 3),
              stride=(1, 1),
          )
          net = mx.contrib.symbol.DeformableConvolution(
              name=name + "_conv",
              data=net,
              offset=conv_offset,
              num_filter=num_filter,
              pad=(1, 1),
              kernel=(3, 3),
              num_deformable_group=num_group,
              stride=(1, 1),
              no_bias=False,
          )
      else:
          print("use dcnv2 at", name)
          lr_mult = 0.1
          weight_var = mx.sym.Variable(
              name=name + "_conv2_offset_weight",
              init=mx.init.Zero(),
              lr_mult=lr_mult,
          )
          bias_var = mx.sym.Variable(
              name=name + "_conv2_offset_bias",
              init=mx.init.Zero(),
              lr_mult=lr_mult,
          )
          conv2_offset = mx.symbol.Convolution(
              name=name + "_conv2_offset",
              data=net,
              num_filter=27,
              pad=(1, 1),
              kernel=(3, 3),
              stride=(1, 1),
              weight=weight_var,
              bias=bias_var,
              lr_mult=lr_mult,
          )
          conv2_offset_t = mx.sym.slice_axis(
              conv2_offset, axis=1, begin=0, end=18
          )
          conv2_mask = mx.sym.slice_axis(
              conv2_offset, axis=1, begin=18, end=None
          )
          conv2_mask = 2 * mx.sym.Activation(
              conv2_mask, act_type="sigmoid"
          )
  
          conv2 = mx.contrib.symbol.ModulatedDeformableConvolution(
              name=name + "_conv2",
              data=net,
              offset=conv2_offset_t,
              mask=conv2_mask,
              num_filter=num_filter,
              pad=(1, 1),
              kernel=(3, 3),
              stride=(1, 1),
              num_deformable_group=num_group,
              no_bias=True,
          )
          net = conv2
      net = mx.sym.BatchNorm(
          data=net,
          fix_gamma=False,
          eps=2e-5,
          momentum=0.9,
          name=name + "_bn",
      )
      if len(act_type) > 0:
          net = mx.symbol.Activation(
              data=net, act_type=act_type, name=name + "_act"
          )
      return net
  
file_path: insightface/detection/retinaface/rcnn/symbol/symbol_common.py
imports: import mxnet
  import mxnet.ndarray
  import numpy
  from rcnn.config import config
  from rcnn.PY_OP import rpn_fpn_ohem3, cascade_refine
label_desc: Use image node_id 2 for calling a global function with example usage: conv_deformable(net, num_filter, num_group, act_type, name) and returns: net