code: def conv_hpm(
      data,
      num_filter,
      stride,
      dim_match,
      name,
      binarize,
      dcn,
      dilation,
      **kwargs,
  ):
      bit = 1
      # print('in unit2')
      # the same as https://github.com/facebook/fb.resnet.torch#notes, a bit difference with origin paper
      bn1 = mx.sym.BatchNorm(
          data=data,
          fix_gamma=False,
          eps=2e-5,
          momentum=bn_mom,
          name=name + "_bn1",
      )
      if not binarize:
          act1 = Act(data=bn1, act_type="relu", name=name + "_relu1")
          if not dcn:
              conv1 = Conv(
                  data=act1,
                  num_filter=int(num_filter * 0.5),
                  kernel=(3, 3),
                  stride=(1, 1),
                  pad=(dilation, dilation),
                  dilate=(dilation, dilation),
                  no_bias=True,
                  workspace=workspace,
                  name=name + "_conv1",
              )
          else:
              conv1_offset = mx.symbol.Convolution(
                  name=name + "_conv1_offset",
                  data=act1,
                  num_filter=18,
                  pad=(1, 1),
                  kernel=(3, 3),
                  stride=(1, 1),
              )
              conv1 = mx.contrib.symbol.DeformableConvolution(
                  name=name + "_conv1",
                  data=act1,
                  offset=conv1_offset,
                  num_filter=int(num_filter * 0.5),
                  pad=(1, 1),
                  kernel=(3, 3),
                  num_deformable_group=1,
                  stride=(1, 1),
                  dilate=(1, 1),
                  no_bias=True,
              )
      else:
          act1 = mx.sym.QActivation(
              data=bn1,
              act_bit=ACT_BIT,
              name=name + "_relu1",
              backward_only=True,
          )
          conv1 = mx.sym.QConvolution_v1(
              data=act1,
              num_filter=int(num_filter * 0.5),
              kernel=(3, 3),
              stride=(1, 1),
              pad=(1, 1),
              no_bias=True,
              workspace=workspace,
              name=name + "_conv1",
              act_bit=ACT_BIT,
              weight_bit=bit,
          )
      bn2 = mx.sym.BatchNorm(
          data=conv1,
          fix_gamma=False,
          eps=2e-5,
          momentum=bn_mom,
          name=name + "_bn2",
      )
      if not binarize:
          act2 = Act(data=bn2, act_type="relu", name=name + "_relu2")
          if not dcn:
              conv2 = Conv(
                  data=act2,
                  num_filter=int(num_filter * 0.25),
                  kernel=(3, 3),
                  stride=(1, 1),
                  pad=(dilation, dilation),
                  dilate=(dilation, dilation),
                  no_bias=True,
                  workspace=workspace,
                  name=name + "_conv2",
              )
          else:
              conv2_offset = mx.symbol.Convolution(
                  name=name + "_conv2_offset",
                  data=act2,
                  num_filter=18,
                  pad=(1, 1),
                  kernel=(3, 3),
                  stride=(1, 1),
              )
              conv2 = mx.contrib.symbol.DeformableConvolution(
                  name=name + "_conv2",
                  data=act2,
                  offset=conv2_offset,
                  num_filter=int(num_filter * 0.25),
                  pad=(1, 1),
                  kernel=(3, 3),
                  num_deformable_group=1,
                  stride=(1, 1),
                  dilate=(1, 1),
                  no_bias=True,
              )
      else:
          act2 = mx.sym.QActivation(
              data=bn2,
              act_bit=ACT_BIT,
              name=name + "_relu2",
              backward_only=True,
          )
          conv2 = mx.sym.QConvolution_v1(
              data=act2,
              num_filter=int(num_filter * 0.25),
              kernel=(3, 3),
              stride=(1, 1),
              pad=(1, 1),
              no_bias=True,
              workspace=workspace,
              name=name + "_conv2",
              act_bit=ACT_BIT,
              weight_bit=bit,
          )
      bn3 = mx.sym.BatchNorm(
          data=conv2,
          fix_gamma=False,
          eps=2e-5,
          momentum=bn_mom,
          name=name + "_bn3",
      )
      if not binarize:
          act3 = Act(data=bn3, act_type="relu", name=name + "_relu3")
          if not dcn:
              conv3 = Conv(
                  data=act3,
                  num_filter=int(num_filter * 0.25),
                  kernel=(3, 3),
                  stride=(1, 1),
                  pad=(dilation, dilation),
                  dilate=(dilation, dilation),
                  no_bias=True,
                  workspace=workspace,
                  name=name + "_conv3",
              )
          else:
              conv3_offset = mx.symbol.Convolution(
                  name=name + "_conv3_offset",
                  data=act3,
                  num_filter=18,
                  pad=(1, 1),
                  kernel=(3, 3),
                  stride=(1, 1),
              )
              conv3 = mx.contrib.symbol.DeformableConvolution(
                  name=name + "_conv3",
                  data=act3,
                  offset=conv3_offset,
                  num_filter=int(num_filter * 0.25),
                  pad=(1, 1),
                  kernel=(3, 3),
                  num_deformable_group=1,
                  stride=(1, 1),
                  dilate=(1, 1),
                  no_bias=True,
              )
      else:
          act3 = mx.sym.QActivation(
              data=bn3,
              act_bit=ACT_BIT,
              name=name + "_relu3",
              backward_only=True,
          )
          conv3 = mx.sym.QConvolution_v1(
              data=act3,
              num_filter=int(num_filter * 0.25),
              kernel=(3, 3),
              stride=(1, 1),
              pad=(1, 1),
              no_bias=True,
              workspace=workspace,
              name=name + "_conv3",
              act_bit=ACT_BIT,
              weight_bit=bit,
          )
      conv4 = mx.symbol.Concat(*[conv1, conv2, conv3])
      if binarize:
          conv4 = mx.sym.BatchNorm(
              data=conv4,
              fix_gamma=False,
              eps=2e-5,
              momentum=bn_mom,
              name=name + "_bn4",
          )
      if dim_match:
          shortcut = data
      else:
          if not binarize:
              shortcut = Conv(
                  data=act1,
                  num_filter=num_filter,
                  kernel=(1, 1),
                  stride=stride,
                  no_bias=True,
                  workspace=workspace,
                  name=name + "_sc",
              )
          else:
              # assert(False)
              shortcut = mx.sym.QConvolution_v1(
                  data=act1,
                  num_filter=num_filter,
                  kernel=(1, 1),
                  stride=stride,
                  pad=(0, 0),
                  no_bias=True,
                  workspace=workspace,
                  name=name + "_sc",
                  act_bit=ACT_BIT,
                  weight_bit=bit,
              )
              shortcut = mx.sym.BatchNorm(
                  data=shortcut,
                  fix_gamma=False,
                  eps=2e-5,
                  momentum=bn_mom,
                  name=name + "_sc_bn",
              )
      if memonger:
          shortcut._set_attr(mirror_stage="True")
      return conv4 + shortcut
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import mxnet
  import numpy
  from config import config
label_desc: Use image node_id 6 for calling a global function with example usage: conv_hpm(data, num_filter, stride, dim_match, name, binarize, dcn, dilation) and returns: unknown