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_ops(self):
      for mge_op in self._mge_operators:
          opr_type = mgb.cgtools.get_opr_type(mge_op)
  
          # some reshape operators provide data for batchnorm
          if opr_type == "Reshape":
              output = mge_op.outputs[0]
              next_ops = self._mge_var2oprs[output.id]
              if len(next_ops) == 1:
                  (next_op_id, _) = next_ops[0]
                  next_op = self._mge_map_oprs[next_op_id]
  
                  if (
                      mgb.cgtools.get_opr_type(next_op)
                      == "BatchNormForward"
                  ):
                      self._skip_tensors.update(
                          [inp.name for inp in mge_op.inputs]
                      )
                      # using output name to address input symbol var
                      self._bn_statistis_tensors[
                          mge_op.outputs[0].name
                      ] = mge_op.inputs[0]
                      # skip this reshape op
                      continue
  
          self._op_converters[opr_type](mge_op)
  
      self.convert_tensors()
  
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 5 for calling the MegengineConverter obj's underlying member method code with example usage: obj.convert_ops() without return types