File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -1128,13 +1128,6 @@ function Operation(ptr::Ptr)
1128
1128
return self
1129
1129
end
1130
1130
1131
- struct NodeNameNotFound <: Exception
1132
- name:: String
1133
- end
1134
-
1135
- function Base. show (io:: IO , err:: NodeNameNotFound )
1136
- print (io, " Node $(err. name) not found in graph" )
1137
- end
1138
1131
1139
1132
get_graph (n:: AbstractOperation ) = Operation (n). graph
1140
1133
@@ -1555,12 +1548,12 @@ end
1555
1548
1556
1549
Returns the tensor with name `name` (in name:port format) in the given graph.
1557
1550
1558
- Throws a `NodeNameNotFound` exception if there is no such tensor .
1551
+ Returns `nothing` if the tensor is not found .
1559
1552
"""
1560
1553
@with_def_graph function get_tensor_by_name (graph:: Graph , full_name)
1561
1554
name, port = parse_port_name (full_name)
1562
1555
maybe_node = get_node_by_name (graph, name)
1563
- isnull (maybe_node) && throw ( NodeNameNotFound (full_name))
1556
+ isnull (maybe_node) && return nothing
1564
1557
node = get (maybe_node)
1565
1558
return Tensor (node, port)
1566
1559
end
You can’t perform that action at this time.
0 commit comments