From f4450e9e53edf73f0e1691be22b62e5d58600fed Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 3 Mar 2023 16:21:50 -0600 Subject: [PATCH] output_names exeption if length is zero. --- src/TensorFlowNET.Core/Graphs/FuncGraph.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/TensorFlowNET.Core/Graphs/FuncGraph.cs b/src/TensorFlowNET.Core/Graphs/FuncGraph.cs index a8dd4eb9..3a209b89 100644 --- a/src/TensorFlowNET.Core/Graphs/FuncGraph.cs +++ b/src/TensorFlowNET.Core/Graphs/FuncGraph.cs @@ -61,6 +61,11 @@ public class FuncGraph : Graph, IDisposable string[] output_names) { var status = new Status(); + if (output_names != null && output_names.Length == 0) + { + output_names = null; + }; + _func_graph_handle = c_api.TF_GraphToFunction(_handle, _graph_key, false,