File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1264,21 +1264,21 @@ def extract_subset_of_nodes(
12641264 current_input_index = 0
12651265 intermediate = {name }
12661266 cut_points -= {name }
1267- cached = {}
1267+ cached : Dict [ int , List [ str ]] = {}
12681268 inputs = set (k for k in node .input if k )
12691269 while not (inputs <= cut_points ) and current_node_index >= 0 :
12701270 node = model .graph .node [current_node_index ]
12711271 # node inputs including hidden ones
12721272 if current_node_index in cached :
12731273 node_inputs = cached [current_node_index ]
12741274 else :
1275- node_inputs = set (i for i in node .input if i )
1275+ set_inputs = set (i for i in node .input if i )
12761276 if node .op_type in {"Scan" , "If" , "Loop" }:
12771277 # there are hidden inputs
12781278 for att in node .attribute :
12791279 if att .type == onnx .AttributeProto .GRAPH :
1280- node_inputs |= get_hidden_inputs (att .g )
1281- node_inputs = list (node_inputs )
1280+ set_inputs |= get_hidden_inputs (att .g )
1281+ node_inputs = list (set_inputs )
12821282 cached [current_node_index ] = node_inputs
12831283 # processing
12841284 if current_input_index == 0 or not node_inputs :
You can’t perform that action at this time.
0 commit comments