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):
532
532
return list (filter (lambda x : not util .is_finn_op (x .domain ), self .graph .node ))
533
533
534
534
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 ."""
536
536
n_ind = 0
537
537
try :
538
538
for n in self .graph .node :
@@ -541,15 +541,17 @@ def get_node_index(self, node):
541
541
n_ind += 1
542
542
except ValueError :
543
543
return None
544
+ return None
544
545
545
546
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 ."""
547
548
try :
548
549
for node in self .graph .node :
549
550
if node .name == node_name :
550
551
return node
551
552
except ValueError :
552
553
return None
554
+ return None
553
555
554
556
def get_tensor_layout (self , tensor_name ):
555
557
"""Returns the data layout annotation of tensor with given name.
You can’t perform that action at this time.
0 commit comments