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 replace_input_output_tensor_name(self):
      for op in self._mace_net_def.op:
          for i in six.moves.range(len(op.input)):
              if "," in op.input[i]:
                  op_name = op.input[i]
                  op_name = op_name.replace(",", "#")
                  if (
                      op_name in self._option.input_nodes
                      or op_name in self._option.output_nodes
                  ):
                      op.input[i] = op_name
          for i in six.moves.range(len(op.output)):
              if "," in op.output[i]:
                  op_name = op.output[i]
                  op_name = op_name.replace(",", "#")
                  if op_name in self._option.output_nodes:
                      op.output[i] = op_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 3 for calling the MegengineConverter obj's underlying member method code with example usage: obj.replace_input_output_tensor_name() without return types