def __init__(self, model, default_batch_size=1, initial_types=None,
                 reserved_variable_names=None, reserved_operator_names=None, target_opset=None,
                 custom_conversion_functions=None, custom_shape_calculators=None, metadata_props=None):
        '''
        Initialize a Topology object, which is an intermediate representation of a computational graph.

        :param model: RawModelContainer object or one of its derived classes. It contains the original model.
        :param default_batch_size: batch_size prepend to scalar and array types from CoreML. It's usually 1 or 'None'.
        :param initial_types: A list providing some types for some root variables. Each element is a tuple of a variable
        name and a type defined in data_types.py.
        :param reserved_variable_names: A set of strings which are not allowed to be used as a variable name
        :param reserved_operator_names: A set of strings which are not allowed to be used as a operator name
        :param custom_conversion_functions: a dictionary for specifying the user customized conversion function
        :param custom_shape_calculators: a dictionary for specifying the user customized shape calculator
        '''
        self.scopes = []
        self.raw_model = model
        self.scope_names = set()
        self.variable_name_set = reserved_variable_names if reserved_variable_names is not None else set()
        self.operator_name_set = reserved_operator_names if reserved_operator_names is not None else set()
        self.initial_types = initial_types if initial_types else list()
        self.metadata_props = metadata_props if metadata_props else dict()
        self.default_batch_size = default_batch_size
        self.target_opset = target_opset
        self.custom_conversion_functions = custom_conversion_functions if custom_conversion_functions else {}
        self.custom_shape_calculators = custom_shape_calculators if custom_shape_calculators else {}

        # This attribute is used in optimizing the graph structure. If root_names is not empty, only the variables
        # specified will be treated as the roots (i.e., set is_fed to True in the beginning of a graph evaluation) of
        # the graph. Specifying all root variables in this list and leaving it empty are equivalent. This attribute
        # directly affects _initialize_graph_status_for_traversing function and indirectly affects _infer_all_shapes and
        # _prune functions.
        self.root_names = list()
def __init__ ( self , model , default_batch_size = 1 , initial_types = None , reserved_variable_names = None , reserved_operator_names = None , target_opset = None , custom_conversion_functions = None , custom_shape_calculators = None , metadata_props = None ) : self . scopes = [ ] self . raw_model = model self . scope_names = set ( ) self . variable_name_set = reserved_variable_names if reserved_variable_names is not None else set ( ) self . operator_name_set = reserved_operator_names if reserved_operator_names is not None else set ( ) self . initial_types = initial_types if initial_types else list ( ) self . metadata_props = metadata_props if metadata_props else dict ( ) self . default_batch_size = default_batch_size self . target_opset = target_opset self . custom_conversion_functions = custom_conversion_functions if custom_conversion_functions else { } self . custom_shape_calculators = custom_shape_calculators if custom_shape_calculators else { } self . root_names = list ( )
Initialize a Topology object, which is an intermediate representation of a computational graph.

        :param model: RawModelContainer object or one of its derived classes. It contains the original model.
        :param default_batch_size: batch_size prepend to scalar and array types from CoreML. It's usually 1 or 'None'.
        :param initial_types: A list providing some types for some root variables. Each element is a tuple of a variable
        name and a type defined in data_types.py.
        :param reserved_variable_names: A set of strings which are not allowed to be used as a variable name
        :param reserved_operator_names: A set of strings which are not allowed to be used as a operator name
        :param custom_conversion_functions: a dictionary for specifying the user customized conversion function
        :param custom_shape_calculators: a dictionary for specifying the user customized shape calculator