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_math_elemwise(self, mge_op):
      op = self.convert_general_op(mge_op)
      op.type = MaceOp.Eltwise.name
  
      type_arg = op.arg.add()
      type_arg.name = MaceKeyword.mace_element_type_str
      type_arg.i = self.eltwise_type[mge_op.params["mode"]].value
      # EXP in megengine always use the np.e as base
      if mge_op.params["mode"] == "EXP":
          exp_tensor_name = mge_op.name + "_exp_base"
          exp_shape = mge_op.outputs[0].imm_shape
          exp_value = (np.e * np.ones(exp_shape)).flatten()
          self.add_tensor(
              exp_tensor_name, exp_shape, mace_pb2.DT_FLOAT, exp_value
          )
          del op.input[0]
          op.input.extend([exp_tensor_name, mge_op.inputs[0].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 14 for calling the MegengineConverter obj's underlying member method code with example usage: obj.convert_math_elemwise(mge_op) without return types