File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -532,7 +532,7 @@ def get_non_finn_nodes(self):
532532 return list (filter (lambda x : not util .is_finn_op (x .domain ), self .graph .node ))
533533
534534 def get_node_index (self , node ):
535- """Returns current index of given node."""
535+ """Returns current index of given node, or None if not found ."""
536536 n_ind = 0
537537 try :
538538 for n in self .graph .node :
@@ -541,15 +541,17 @@ def get_node_index(self, node):
541541 n_ind += 1
542542 except ValueError :
543543 return None
544+ return None
544545
545546 def get_node_from_name (self , node_name ):
546- """Returns the node with the specified name."""
547+ """Returns the node with the specified name, or None if not found ."""
547548 try :
548549 for node in self .graph .node :
549550 if node .name == node_name :
550551 return node
551552 except ValueError :
552553 return None
554+ return None
553555
554556 def get_tensor_layout (self , tensor_name ):
555557 """Returns the data layout annotation of tensor with given name.
You can’t perform that action at this time.
0 commit comments