class_docstr: A floder to fold a graph' nodes which has same scope into one node.
class_docstr_tok: ["A","floder","to","fold","a","graph","'","nodes","which","has","same","scope","into","one","node","."]
docstr: Initializes a Folder.
  
  Args:
    graph: the graph to be folded.
    init_level: the start scope level to be folded.
    fold_level_num: the number of level from init_level to be folded. For example,
      there are three nodes, whose scope are A/B/X, A/B/Y, A/C/Z. If init_level=0 and fold_level_num=1,
      then the fold result is A/B and A/C.
docstr_tok: ["Initializes","a","Folder",".","Args",":","graph",":","the","graph","to","be","folded",".","init_level",":","the","start","scope","level","to","be","folded",".","fold_level_num",":","the","number","of","level","from","init_level","to","be","folded",".","For","example",",","there","are","three","nodes",",","whose","scope","are","A\/B\/X",",","A\/B\/Y",",","A\/C\/Z",".","If","init_level=0","and","fold_level_num=1",",","then","the","fold","result","is","A\/B","and","A\/C","."]
code: def __init__(
      self,
      graph,
      weights_dict,
      init_level=0,
      fold_level_num=0,
      scope_names=None,
  ):
      """
      Initializes a Folder.
  
      Args:
        graph: the graph to be folded.
        init_level: the start scope level to be folded.
        fold_level_num: the number of level from init_level to be folded. For example,
          there are three nodes, whose scope are A/B/X, A/B/Y, A/C/Z. If init_level=0 and fold_level_num=1,
          then the fold result is A/B and A/C.
      """
      self._graph = graph
      self._weights_dict = weights_dict
      self._init_level = init_level
      self._fold_level_num = fold_level_num
      self._scope_names = scope_names
  
file_path: MMdnn/mmdnn/conversion/rewriter/folder.py
imports: from mmdnn.conversion.common.IR.IR_graph import *
  import sys
  import re
  import numpy
  import collections
label_desc: Use image node_id 1 to create a new Folder object from inherited base classes: object with example: obj = Folder(graph, weights_dict, init_level, fold_level_num, scope_names)