From db625c7834c65606a54466c918f22647114d4f19 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Sun, 16 Jan 2022 13:11:06 -0600 Subject: [PATCH] remove default graph validation --- src/TensorFlowNET.Core/Graphs/Graph.Operation.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/TensorFlowNET.Core/Graphs/Graph.Operation.cs b/src/TensorFlowNET.Core/Graphs/Graph.Operation.cs index bb09bf8e..fc356687 100644 --- a/src/TensorFlowNET.Core/Graphs/Graph.Operation.cs +++ b/src/TensorFlowNET.Core/Graphs/Graph.Operation.cs @@ -68,12 +68,11 @@ namespace Tensorflow if (handle == IntPtr.Zero) throw new ValueError($"Could not find operation \"{operName}\" inside graph \"{_graph_key}\"."); - var defaultKey = tf.get_default_graph().graph_key; + /*var defaultKey = tf.get_default_graph().graph_key; if (tf.get_default_graph().GetType().Name == "Graph" && graph_key != defaultKey) { - //Console.WriteLine($"Current graph is not default graph."); throw new RuntimeError($"Current graph is not default graph. Default Graph Key: {defaultKey}, Current Graph Key: {graph_key}"); - } + }*/ return new Operation(handle, g: this); }