diff --git a/docs/source/ControlDependency.md b/docs/source/ControlDependency.md new file mode 100644 index 00000000..1659d983 --- /dev/null +++ b/docs/source/ControlDependency.md @@ -0,0 +1,4 @@ +# Chapter. Control Dependency + + + diff --git a/docs/source/NameScope.md b/docs/source/NameScope.md new file mode 100644 index 00000000..dea4a676 --- /dev/null +++ b/docs/source/NameScope.md @@ -0,0 +1,4 @@ +# Chapter. Name Scoping + +Typical TensorFlow graphs can have many thousands of nodes--far too many to see easily all at once, or even to lay out using standard graph tools. To simplify, variable names can be scoped and the visualization uses this information to define a hierarchy on the nodes in the graph. By default, only the top of this hierarchy is shown. Here is an example that defines three operations under the `hidden` name scope using `tf.name_scope`: + diff --git a/docs/source/index.rst b/docs/source/index.rst index ad3caade..b0962402 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -23,5 +23,7 @@ Welcome to TensorFlow.NET's documentation! Graph Operation Attribute + NameScope + ControlDependency Gradient EagerMode \ No newline at end of file diff --git a/src/TensorFlowNET.Core/Graphs/Graph.cs b/src/TensorFlowNET.Core/Graphs/Graph.cs index dc25f853..391c94cd 100644 --- a/src/TensorFlowNET.Core/Graphs/Graph.cs +++ b/src/TensorFlowNET.Core/Graphs/Graph.cs @@ -138,6 +138,12 @@ namespace Tensorflow op_def: op_def); _create_op_helper(op, true); + + Console.Write($"create_op: {op_type} '{node_def.Name}'"); + Console.Write($", inputs: {(inputs.Count == 0 ? "empty" : String.Join(",", inputs.Select(x => x.name)))}"); + Console.Write($", outputs: {(op.outputs.Length == 0 ? "empty" : String.Join(",", op.outputs.Select(x => x.name)))}"); + Console.WriteLine(); + return op; }