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_axisaddrm(self, mge_op):
      op = self.convert_general_op(mge_op)
      if mge_op.params["nr_desc"] == 1:
          if mge_op.params["desc"][0]["method"] == 0:
              op.type = MaceOp.ExpandDims.name
          else:
              op.type = MaceOp.Squeeze.name
  
          axis_arg = op.arg.add()
          axis_arg.name = MaceKeyword.mace_axis_str
          axis_arg.i = mge_op.params["desc"][0]["axisnum"]
      else:
          op.type = MaceOp.Reshape.name
  
          dest_shape_tensor_name = op.name + "_dest_shape"
          dest_shape = mge_op.outputs[0].imm_shape
          self.add_tensor(
              dest_shape_tensor_name,
              (len(dest_shape),),
              mace_pb2.DT_INT32,
              dest_shape,
          )
          op.input.extend([dest_shape_tensor_name])
  
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 20 for calling the MegengineConverter obj's underlying member method code with example usage: obj.convert_axisaddrm(mge_op) without return types