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 add_tensor(self, name, shape, data_type, value):
      tensor = self._mace_net_def.tensors.add()
      tensor.name = name
      tensor.dims.extend(list(shape))
      tensor.data_type = data_type
      if data_type == mace_pb2.DT_INT32:
          tensor.int32_data.extend(value)
      else:
          tensor.float_data.extend(value)
  
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 6 for calling the MegengineConverter obj's underlying member method code with example usage: obj.add_tensor(name, shape, data_type, value) without return types