class_docstr: A class for convert megengine dumped model to mace model.
class_docstr_tok: ["A","class","for","convert","megengine","dumped","model","to","mace","model","."]
code: def convert_conv2d(self, mge_op):
      op = self.convert_general_op(mge_op)
  
      if mge_op.params["sparse"] == "GROUP":
          # weight shape in group conv2d:
          # (groups, out_channel//groups, in_channels//groups, *kernel_size)
          groups_divisible = mge_op.inputs[1].imm_shape[2]
          mace_check(
              groups_divisible == 1,
              "Mace does not support group convolution yet",
          )
          op.type = MaceOp.DepthwiseConv2d.name
      elif mge_op.params["sparse"] == "DENSE":
          op.type = MaceOp.Conv2D.name
      else:
          raise Exception("Unknown sparse mode")
  
      mace_check(
          mge_op.params["mode"] != "CONVOLUTION",
          "Mace does not support CONVOLUTION computation mode yet",
      )
  
      self.add_stride_pad_kernel_arg(mge_op.params, op)
  
      del op.output[1:]
      del op.output_shape[1:]
  
imports: import os
  import math
  import numpy
  import six
  import megengine._internal
  from enum import Enum
  from py_proto import mace_pb2
  from transform import base_converter
  from transform.base_converter import PoolingType
  from transform.base_converter import ActivationType
  from transform.base_converter import EltwiseType
  from transform.base_converter import FrameworkType
  from transform.base_converter import ReduceType
  from transform.base_converter import DataFormat
  from transform.base_converter import MaceOp
  from transform.base_converter import MaceKeyword
  from transform.base_converter import ConverterUtil
  from transform.base_converter import RoundMode
  from utils.util import mace_check
label_desc: Use image node_id 11 for calling the MegengineConverter obj's underlying member method code with example usage: obj.convert_conv2d(mge_op) without return types