Browse Source

remove default graph validation

tags/v0.70.2-NET6
Oceania2018 3 years ago
parent
commit
db625c7834
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/TensorFlowNET.Core/Graphs/Graph.Operation.cs

+ 2
- 3
src/TensorFlowNET.Core/Graphs/Graph.Operation.cs View File

@@ -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);
}


Loading…
Cancel
Save