diff --git a/mindinsight/datavisual/data_transform/graph/graph.py b/mindinsight/datavisual/data_transform/graph/graph.py index 6baf86ac..f4495132 100644 --- a/mindinsight/datavisual/data_transform/graph/graph.py +++ b/mindinsight/datavisual/data_transform/graph/graph.py @@ -52,6 +52,9 @@ class Graph: self._const_node_temp_cache = {} self._parameter_node_temp_cache = {} + self._leaf_nodes = {} + self._full_name_map_name = {} + def build_graph(self, proto_data): """This method is used to build the graph.""" logger.info("Start to build graph") @@ -68,6 +71,8 @@ class Graph: # Since const nodes are not aggregated, adding them at the end can save a lot of computation. self._add_variable_nodes(NodeTypeEnum.CONST.value) self._calc_subnode_count() + self._leaf_nodes = self._get_leaf_nodes() + self._full_name_map_name = self._get_leaf_node_full_name_map() precision = 6 time_consuming = round(time.time() - start_time, precision) @@ -75,6 +80,32 @@ class Graph: self.normal_node_count, len(self._const_node_temp_cache), len(self._parameter_node_temp_cache), time_consuming) + def _get_leaf_nodes(self): + """ + Get all leaf nodes, including normal leaf nodes, const nodes and param nodes. + """ + leaf_nodes = {} + for node_name, node in self._normal_node_map.items(): + # update full name + if not node.full_name: + node.full_name = node.name + if not node.type or node.type.endswith('_scope'): + continue + leaf_nodes[node_name] = node + + return leaf_nodes + + def _get_leaf_node_full_name_map(self): + """Get node by debugger name.""" + full_name_map = {} + for name, node in self._leaf_nodes.items(): + if not node.full_name: + logger.warning("Node %s does not have full name.", name) + continue + full_name_map[node.full_name] = name + + return full_name_map + def exist_node(self, name): """ Check node exist in graph. diff --git a/mindinsight/datavisual/data_transform/graph/msgraph.py b/mindinsight/datavisual/data_transform/graph/msgraph.py index 2d2003b0..3e0899c7 100644 --- a/mindinsight/datavisual/data_transform/graph/msgraph.py +++ b/mindinsight/datavisual/data_transform/graph/msgraph.py @@ -64,6 +64,7 @@ class MSGraph(Graph): else: node_name = node_proto.full_name node = Node(name=node_name, node_id=node_proto.name) + node.full_name = node_proto.full_name node.type = node_proto.op_type self._parse_attributes(node_proto.attribute, node) @@ -72,7 +73,8 @@ class MSGraph(Graph): node.output_i = node_proto.output_i node.scope = node_proto.scope node.output_shape = self._get_shape_by_parse_type_proto(node_proto.output_type) - node.output_data_type = self._get_data_type_by_parse_type_proto(node_proto.output_type) + node.output_nums = len(node.output_shape) + node.output_data_type = self._get_data_type_by_parse_type_proto(node_proto.output_type, node) self._cache_node(node) @@ -90,10 +92,11 @@ class MSGraph(Graph): continue node = Node(name=parameter.name, node_id=parameter.name) node.type = NodeTypeEnum.PARAMETER.value - node.output_data_type = self._get_data_type_by_parse_type_proto(parameter.type) node.output_shape = self._get_shape_by_parse_type_proto(parameter.type) + node.output_nums = len(node.output_shape) + node.output_data_type = self._get_data_type_by_parse_type_proto(parameter.type, node) attr = dict( - type=self._get_data_type_by_parse_type_proto(parameter.type), + type=self._get_data_type_by_parse_type_proto(parameter.type, node), shape=str(self._get_shape_by_parse_type_proto(parameter.type)) ) node.add_attr(attr) @@ -117,11 +120,18 @@ class MSGraph(Graph): node = Node(name=const.key, node_id=const.key) node.type = NodeTypeEnum.CONST.value node.add_attr({const.key: str(const.value)}) + if const.value.dtype == DataType.DT_TENSOR: - shape = [] - for dim in const.value.tensor_val.dims: - shape.append(dim) - node.output_shape = shape + shape = list(const.value.tensor_val.dims) + node.output_shape.append(shape) + if const.value.tensor_val.HasField('data_type'): + node.elem_types.append(DataType.Name(const.value.tensor_val.data_type)) + else: + node.elem_types.append(DataType.Name(const.value.dtype)) + # dim is zero + node.output_shape.append([]) + + node.output_nums = len(node.output_shape) self._cache_node(node) @@ -136,17 +146,24 @@ class MSGraph(Graph): list, a list of shape. """ shapes = [] + if type_proto.HasField('data_type'): + if type_proto.data_type != DataType.DT_TENSOR and \ + type_proto.data_type != DataType.DT_TUPLE: + # Append an empty list as a placeholder + # for the convenience of output number calculation. + shapes.append([]) + return shapes if type_proto.HasField('tensor_type'): tensor_type = type_proto.tensor_type tensor_shape_proto = tensor_type.shape - for dim in tensor_shape_proto.dim: - shapes.append(dim.size) + shape = [dim.size for dim in tensor_shape_proto.dim] + shapes.append(shape) if type_proto.HasField('sequence_type'): for elem_type in type_proto.sequence_type.elem_types: - shapes.append(self._get_shape_by_parse_type_proto(elem_type)) + shapes.extend(self._get_shape_by_parse_type_proto(elem_type)) return shapes - def _get_data_type_by_parse_type_proto(self, type_proto): + def _get_data_type_by_parse_type_proto(self, type_proto, node): """ Get data type by parse type proto object. @@ -165,14 +182,17 @@ class MSGraph(Graph): tensor_type_proto = type_proto.tensor_type value = type_proto.tensor_type.elem_type elem_type_name = self._get_data_type_name_by_value(tensor_type_proto, value, field_name='elem_type') + node.elem_types.append(elem_type_name) return f'{data_type_name}[{elem_type_name}]' if type_proto.data_type == DataType.DT_TUPLE: data_types = [] for elem_type in type_proto.sequence_type.elem_types: - data_types.append(self._get_data_type_by_parse_type_proto(elem_type)) + data_types.append(self._get_data_type_by_parse_type_proto(elem_type, node)) return f'{data_type_name}{str(data_types)}' + node.elem_types.append(data_type_name) + return data_type_name def _parse_inputs(self, input_protos, node): diff --git a/mindinsight/datavisual/data_transform/graph/node.py b/mindinsight/datavisual/data_transform/graph/node.py index c1212099..73d80144 100644 --- a/mindinsight/datavisual/data_transform/graph/node.py +++ b/mindinsight/datavisual/data_transform/graph/node.py @@ -50,6 +50,9 @@ class Node: self.independent_layout = False self.output_shape = [] self.output_data_type = "" + self.output_nums = 0 + self.elem_types = [] + self.full_name = "" def to_dict(self): """Converts the node object to dictionary format.""" @@ -208,6 +211,7 @@ class Node: src_node (Node): The copied node. dst_node (Node): The destination node. """ + dst_node.full_name = src_node.full_name dst_node.type = src_node.type dst_node.output_i = src_node.output_i dst_node.subnode_count = src_node.subnode_count @@ -215,6 +219,8 @@ class Node: dst_node.independent_layout = src_node.independent_layout dst_node.output_shape = src_node.output_shape dst_node.output_data_type = src_node.output_data_type + dst_node.output_nums = src_node.output_nums + dst_node.elem_types = src_node.elem_types dst_node.add_attr(src_node.attr) def __str__(self): diff --git a/tests/st/func/datavisual/graph/graph_results/test_query_nodes_success_result2.json b/tests/st/func/datavisual/graph/graph_results/test_query_nodes_success_result2.json index f356f95d..5d0baa8c 100644 --- a/tests/st/func/datavisual/graph/graph_results/test_query_nodes_success_result2.json +++ b/tests/st/func/datavisual/graph/graph_results/test_query_nodes_success_result2.json @@ -1 +1 @@ -{"nodes":[{"attr":{},"independent_layout":false,"input":{},"name":"Default/conv1-Conv2d","output":{"Default/bn1/Reshape[12]_1/Reshape6":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,64,112,112]}},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":2,"type":"name_scope"},{"attr":{},"independent_layout":false,"input":{},"name":"Default/bn1-BatchNorm2d","output":{"Default/bn1/Add[5]_0/Add53":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,128,28,28]}},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":5,"type":"name_scope"},{"attr":{},"independent_layout":false,"input":{"Default/bn1-BatchNorm2d/tuple_getitem56":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,128,28,28]},"Default/conv1-Conv2d/Conv2D55":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,64,112,112]}},"name":"Default/bn1","output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":4,"type":"name_scope"}]} \ No newline at end of file +{"nodes": [{"name": "Default/conv1-Conv2d", "type": "name_scope", "attr": {}, "input": {}, "output": {"Default/bn1/Reshape[12]_1/Reshape6": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 2, "independent_layout": false}, {"name": "Default/bn1-BatchNorm2d", "type": "name_scope", "attr": {}, "input": {}, "output": {"Default/bn1/Add[5]_0/Add53": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 5, "independent_layout": false}, {"name": "Default/bn1", "type": "name_scope", "attr": {}, "input": {"Default/bn1-BatchNorm2d/tuple_getitem56": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Conv2D55": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 4, "independent_layout": false}]} diff --git a/tests/st/func/datavisual/graph/graph_results/test_query_nodes_success_result3.json b/tests/st/func/datavisual/graph/graph_results/test_query_nodes_success_result3.json index cd8a2d9b..488af4de 100644 --- a/tests/st/func/datavisual/graph/graph_results/test_query_nodes_success_result3.json +++ b/tests/st/func/datavisual/graph/graph_results/test_query_nodes_success_result3.json @@ -1 +1 @@ -{"nodes":[{"name":"Default/bn1/Reshape[12]_1/Reshape1","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add50":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape2","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add51":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape3","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add52":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape4","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add53":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape5","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add54":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape6","type":"Reshape","attr":{},"input":{"Default/conv1-Conv2d/Conv2D55":{"shape":[1,64,112,112],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape7","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape8","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape9","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape10","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape11","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape12","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false}]} +{"nodes": [{"name": "Default/bn1/Reshape[12]_1/Reshape1", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add50": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape2", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add51": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape3", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add52": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape4", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add53": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape5", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add54": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape6", "type": "Reshape", "attr": {}, "input": {"Default/conv1-Conv2d/Conv2D55": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape7", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape8", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape9", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape10", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape11", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape12", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}]} diff --git a/tests/st/func/datavisual/graph/graph_results/test_query_single_node_success_result1.json b/tests/st/func/datavisual/graph/graph_results/test_query_single_node_success_result1.json index 263bf2bf..a9e6bb70 100644 --- a/tests/st/func/datavisual/graph/graph_results/test_query_single_node_success_result1.json +++ b/tests/st/func/datavisual/graph/graph_results/test_query_single_node_success_result1.json @@ -1 +1 @@ -{"children":{"children":{},"nodes":[{"attr":{},"independent_layout":false,"input":{},"name":"Default/conv1-Conv2d","output":{"Default/bn1/Reshape[12]_1/Reshape6":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,64,112,112]}},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":2,"type":"name_scope"},{"attr":{},"independent_layout":false,"input":{},"name":"Default/bn1-BatchNorm2d","output":{"Default/bn1/Add[5]_0/Add53":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,128,28,28]}},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":5,"type":"name_scope"},{"attr":{},"independent_layout":false,"input":{"Default/bn1-BatchNorm2d/tuple_getitem56":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,128,28,28]},"Default/conv1-Conv2d/Conv2D55":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,64,112,112]}},"name":"Default/bn1","output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":4,"type":"name_scope"}],"scope_name":"Default"},"nodes":[{"attr":{},"independent_layout":false,"input":{},"name":"Default","output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":3,"type":"name_scope"}],"scope_name":""} \ No newline at end of file +{"nodes": [{"name": "Default", "type": "name_scope", "attr": {}, "input": {}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 3, "independent_layout": false}], "scope_name": "", "children": {"nodes": [{"name": "Default/conv1-Conv2d", "type": "name_scope", "attr": {}, "input": {}, "output": {"Default/bn1/Reshape[12]_1/Reshape6": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 2, "independent_layout": false}, {"name": "Default/bn1-BatchNorm2d", "type": "name_scope", "attr": {}, "input": {}, "output": {"Default/bn1/Add[5]_0/Add53": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 5, "independent_layout": false}, {"name": "Default/bn1", "type": "name_scope", "attr": {}, "input": {"Default/bn1-BatchNorm2d/tuple_getitem56": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Conv2D55": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 4, "independent_layout": false}], "scope_name": "Default", "children": {}}} diff --git a/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results2.json b/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results2.json index a3615b5a..50f737fc 100644 --- a/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results2.json +++ b/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results2.json @@ -1 +1 @@ -{"nodes":[{"name":"Default/conv1-Conv2d/Conv2D55","type":"Conv2D","attr":{"output_names":"dtype: DT_GRAPHS\nvalues {\n dtype: DT_FLOAT64\n str_val: \"output\"\n}\n","pad_mode":"dtype: DT_FLOAT64\nstr_val: \"same\"\n"},"input":{"Default/conv1-Conv2d/Parameter[12]_2/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x1":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x2":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x3":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x4":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x5":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x6":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x7":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x8":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x9":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/x10":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/conv1-Conv2d/Parameter[12]_2/conv1.weight":{"shape":[64,3,7,7],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"}},"output":{"Default/bn1/Reshape[12]_1/Reshape6":{"shape":[1,64,112,112],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output_i":0,"proxy_input":{"Default/conv1-Conv2d/Parameter[12]_2":{"edge_type":"data"}},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/conv1-Conv2d/Parameter[12]_2","type":"aggregation_scope","attr":{},"input":{},"output":{"Default/conv1-Conv2d/Conv2D55":{"shape":[64,3,7,7],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"}},"output_i":0,"proxy_input":{},"proxy_output":{"Default/conv1-Conv2d/Conv2D55":{"edge_type":"data"}},"subnode_count":12,"independent_layout":true}]} +{"nodes": [{"name": "Default/conv1-Conv2d/Conv2D55", "type": "Conv2D", "attr": {"output_names": "dtype: DT_GRAPHS\nvalues {\n dtype: DT_FLOAT64\n str_val: \"output\"\n}\n", "pad_mode": "dtype: DT_FLOAT64\nstr_val: \"same\"\n"}, "input": {"Default/conv1-Conv2d/Parameter[12]_2/x": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x1": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x2": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x3": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x4": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x5": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x6": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x7": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x8": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x9": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/x10": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Parameter[12]_2/conv1.weight": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}}, "output": {"Default/bn1/Reshape[12]_1/Reshape6": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {"Default/conv1-Conv2d/Parameter[12]_2": {"edge_type": "data"}}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/conv1-Conv2d/Parameter[12]_2", "type": "aggregation_scope", "attr": {}, "input": {}, "output": {"Default/conv1-Conv2d/Conv2D55": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {}, "proxy_output": {"Default/conv1-Conv2d/Conv2D55": {"edge_type": "data"}}, "subnode_count": 12, "independent_layout": true}]} diff --git a/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results3.json b/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results3.json index cd8a2d9b..488af4de 100644 --- a/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results3.json +++ b/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results3.json @@ -1 +1 @@ -{"nodes":[{"name":"Default/bn1/Reshape[12]_1/Reshape1","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add50":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape2","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add51":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape3","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add52":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape4","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add53":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape5","type":"Reshape","attr":{},"input":{"Default/bn1/Add[5]_0/Add54":{"shape":[1,1024,14,14],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape6","type":"Reshape","attr":{},"input":{"Default/conv1-Conv2d/Conv2D55":{"shape":[1,64,112,112],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape7","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape8","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape9","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape10","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape11","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1/Reshape[12]_1/Reshape12","type":"Reshape","attr":{},"input":{"Default/bn1/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false}]} +{"nodes": [{"name": "Default/bn1/Reshape[12]_1/Reshape1", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add50": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape2", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add51": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape3", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add52": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape4", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add53": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape5", "type": "Reshape", "attr": {}, "input": {"Default/bn1/Add[5]_0/Add54": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape6", "type": "Reshape", "attr": {}, "input": {"Default/conv1-Conv2d/Conv2D55": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape7", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape8", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape9", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape10", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape11", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1/Reshape[12]_1/Reshape12", "type": "Reshape", "attr": {}, "input": {"Default/bn1/x": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}]} diff --git a/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results4.json b/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results4.json index 8185035e..1522f5ae 100644 --- a/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results4.json +++ b/tests/ut/datavisual/processors/graph_results/test_get_nodes_success_expected_results4.json @@ -1 +1 @@ -{"nodes":[{"name":"Default/bn1-BatchNorm2d/tuple_getitem56","type":"tuple_getitem","attr":{},"input":{"Default/bn1-BatchNorm2d/Parameter[22]_3/x":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x1":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x2":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x3":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x4":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x5":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x6":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x7":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x8":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x9":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x10":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/cst13":{"shape":[],"edge_type":"data","independent_layout":false,"data_type":""}},"output":{"Default/bn1/Add[5]_0/Add53":{"shape":[1,128,28,28],"edge_type":"data","independent_layout":false,"data_type":"DT_STRING"}},"output_i":0,"proxy_input":{"Default/bn1-BatchNorm2d/Parameter[22]_3":{"edge_type":"data"}},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1-BatchNorm2d/tuple_getitem105","type":"tuple_getitem","attr":{},"input":{"Default/bn1-BatchNorm2d/Parameter[22]_3/x11":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x12":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x13":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x14":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x15":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x16":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x17":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x18":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x19":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/x20":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/Parameter[22]_3/conv1.weight":{"shape":[64,3,7,7],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/cst25":{"shape":[],"edge_type":"data","independent_layout":false,"data_type":""}},"output":{},"output_i":0,"proxy_input":{"Default/bn1-BatchNorm2d/Parameter[22]_3":{"edge_type":"data"}},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1-BatchNorm2d/Parameter[22]_3","type":"aggregation_scope","attr":{},"input":{},"output":{"Default/bn1-BatchNorm2d/tuple_getitem56":{"shape":[1,3,224,224],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"},"Default/bn1-BatchNorm2d/tuple_getitem105":{"shape":[64,3,7,7],"edge_type":"data","independent_layout":true,"data_type":"DT_STRING"}},"output_i":0,"proxy_input":{},"proxy_output":{"Default/bn1-BatchNorm2d/tuple_getitem56":{"edge_type":"data"},"Default/bn1-BatchNorm2d/tuple_getitem105":{"edge_type":"data"}},"subnode_count":22,"independent_layout":true},{"name":"Default/bn1-BatchNorm2d/cst13","type":"Const","attr":{"cst13":"dtype: DT_INT32\nint_val: 0\n"},"input":{},"output":{"Default/bn1-BatchNorm2d/tuple_getitem56":{"shape":[],"edge_type":"data","independent_layout":false,"data_type":""}},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false},{"name":"Default/bn1-BatchNorm2d/cst25","type":"Const","attr":{"cst25":"dtype: DT_INT32\nint_val: 0\n"},"input":{},"output":{"Default/bn1-BatchNorm2d/tuple_getitem105":{"shape":[],"edge_type":"data","independent_layout":false,"data_type":""}},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":0,"independent_layout":false}]} +{"nodes": [{"name": "Default/bn1-BatchNorm2d/tuple_getitem56", "type": "tuple_getitem", "attr": {}, "input": {"Default/bn1-BatchNorm2d/Parameter[22]_3/x": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x1": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x2": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x3": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x4": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x5": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x6": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x7": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x8": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x9": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x10": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/cst13": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": ""}}, "output": {"Default/bn1/Add[5]_0/Add53": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {"Default/bn1-BatchNorm2d/Parameter[22]_3": {"edge_type": "data"}}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1-BatchNorm2d/tuple_getitem105", "type": "tuple_getitem", "attr": {}, "input": {"Default/bn1-BatchNorm2d/Parameter[22]_3/x11": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x12": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x13": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x14": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x15": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x16": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x17": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x18": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x19": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/x20": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/Parameter[22]_3/conv1.weight": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/cst25": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": ""}}, "output": {}, "output_i": 0, "proxy_input": {"Default/bn1-BatchNorm2d/Parameter[22]_3": {"edge_type": "data"}}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1-BatchNorm2d/Parameter[22]_3", "type": "aggregation_scope", "attr": {}, "input": {}, "output": {"Default/bn1-BatchNorm2d/tuple_getitem56": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}, "Default/bn1-BatchNorm2d/tuple_getitem105": {"shape": [[]], "edge_type": "data", "independent_layout": true, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {}, "proxy_output": {"Default/bn1-BatchNorm2d/tuple_getitem56": {"edge_type": "data"}, "Default/bn1-BatchNorm2d/tuple_getitem105": {"edge_type": "data"}}, "subnode_count": 22, "independent_layout": true}, {"name": "Default/bn1-BatchNorm2d/cst13", "type": "Const", "attr": {"cst13": "dtype: DT_INT32\nint_val: 0\n"}, "input": {}, "output": {"Default/bn1-BatchNorm2d/tuple_getitem56": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": ""}}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}, {"name": "Default/bn1-BatchNorm2d/cst25", "type": "Const", "attr": {"cst25": "dtype: DT_INT32\nint_val: 0\n"}, "input": {}, "output": {"Default/bn1-BatchNorm2d/tuple_getitem105": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": ""}}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 0, "independent_layout": false}]} diff --git a/tests/ut/datavisual/processors/graph_results/test_search_single_node_success_expected_results1.json b/tests/ut/datavisual/processors/graph_results/test_search_single_node_success_expected_results1.json index 263bf2bf..a9e6bb70 100644 --- a/tests/ut/datavisual/processors/graph_results/test_search_single_node_success_expected_results1.json +++ b/tests/ut/datavisual/processors/graph_results/test_search_single_node_success_expected_results1.json @@ -1 +1 @@ -{"children":{"children":{},"nodes":[{"attr":{},"independent_layout":false,"input":{},"name":"Default/conv1-Conv2d","output":{"Default/bn1/Reshape[12]_1/Reshape6":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,64,112,112]}},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":2,"type":"name_scope"},{"attr":{},"independent_layout":false,"input":{},"name":"Default/bn1-BatchNorm2d","output":{"Default/bn1/Add[5]_0/Add53":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,128,28,28]}},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":5,"type":"name_scope"},{"attr":{},"independent_layout":false,"input":{"Default/bn1-BatchNorm2d/tuple_getitem56":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,128,28,28]},"Default/conv1-Conv2d/Conv2D55":{"data_type":"DT_STRING","edge_type":"data","independent_layout":false,"shape":[1,64,112,112]}},"name":"Default/bn1","output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":4,"type":"name_scope"}],"scope_name":"Default"},"nodes":[{"attr":{},"independent_layout":false,"input":{},"name":"Default","output":{},"output_i":0,"proxy_input":{},"proxy_output":{},"subnode_count":3,"type":"name_scope"}],"scope_name":""} \ No newline at end of file +{"nodes": [{"name": "Default", "type": "name_scope", "attr": {}, "input": {}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 3, "independent_layout": false}], "scope_name": "", "children": {"nodes": [{"name": "Default/conv1-Conv2d", "type": "name_scope", "attr": {}, "input": {}, "output": {"Default/bn1/Reshape[12]_1/Reshape6": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 2, "independent_layout": false}, {"name": "Default/bn1-BatchNorm2d", "type": "name_scope", "attr": {}, "input": {}, "output": {"Default/bn1/Add[5]_0/Add53": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 5, "independent_layout": false}, {"name": "Default/bn1", "type": "name_scope", "attr": {}, "input": {"Default/bn1-BatchNorm2d/tuple_getitem56": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}, "Default/conv1-Conv2d/Conv2D55": {"shape": [[]], "edge_type": "data", "independent_layout": false, "data_type": "DT_STRING"}}, "output": {}, "output_i": 0, "proxy_input": {}, "proxy_output": {}, "subnode_count": 4, "independent_layout": false}], "scope_name": "Default", "children": {}}}