File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -642,9 +642,9 @@ def remove_node(self, node_name):
642
642
del self ._dtypes [op_output ]
643
643
644
644
for op_input in node .input :
645
- if op_input not in self . _output_to_consumers :
646
- raise RuntimeError (
647
- "Input %r of node %r not found." % ( op_input , node_name ))
645
+ utils . make_sure (
646
+ op_input in self . _output_to_consumers ,
647
+ "Input %r of node %r not found." , op_input , node_name ))
648
648
self ._unregister_input_name (op_input , node )
649
649
650
650
self ._nodes .remove (node )
@@ -684,11 +684,6 @@ def reset_nodes(self, ops):
684
684
for o in self .outputs :
685
685
if o not in self ._output_to_node_name :
686
686
raise ValueError ("graph output " + o + " not exist" )
687
- for i in self .inputs :
688
- if i .is_graph_input ():
689
- continue
690
- if i .name not in self ._output_to_consumers :
691
- raise ValueError ("graph input %r not exist in graph." % i .name )
692
687
693
688
self ._dtypes = remained_dtypes
694
689
self ._output_shapes = remained_shapes
You can’t perform that action at this time.
0 commit comments