Browse Source

add back Graph.IEnumerable<Operation>

tags/v0.12
Oceania2018 6 years ago
parent
commit
203b0e2820
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      src/TensorFlowNET.Core/Graphs/Graph.cs

+ 11
- 6
src/TensorFlowNET.Core/Graphs/Graph.cs View File

@@ -75,7 +75,10 @@ namespace Tensorflow
/// then create a TensorFlow session to run parts of the graph across a set of local and remote devices. /// then create a TensorFlow session to run parts of the graph across a set of local and remote devices.
/// </summary> /// </summary>
/// <remarks>https://www.tensorflow.org/guide/graphs <br></br>https://www.tensorflow.org/api_docs/python/tf/Graph</remarks> /// <remarks>https://www.tensorflow.org/guide/graphs <br></br>https://www.tensorflow.org/api_docs/python/tf/Graph</remarks>
public partial class Graph : DisposableObject//, IEnumerable<Operation>
public partial class Graph : DisposableObject,
#if !SERIALIZABLE
IEnumerable<Operation>
#endif
{ {
private Dictionary<int, ITensorOrOperation> _nodes_by_id; private Dictionary<int, ITensorOrOperation> _nodes_by_id;
public Dictionary<string, ITensorOrOperation> _nodes_by_name; public Dictionary<string, ITensorOrOperation> _nodes_by_name;
@@ -524,17 +527,19 @@ namespace Tensorflow
} }
return debugString;*/ return debugString;*/
}

/*private IEnumerable<Operation> GetEnumerable()
}
#if !SERIALIZABLE
private IEnumerable<Operation> GetEnumerable()
=> c_api_util.tf_operations(this); => c_api_util.tf_operations(this);


IEnumerator<Operation> IEnumerable<Operation>.GetEnumerator() IEnumerator<Operation> IEnumerable<Operation>.GetEnumerator()
=> GetEnumerable().GetEnumerator(); => GetEnumerable().GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() IEnumerator IEnumerable.GetEnumerator()
=> throw new NotImplementedException();*/

=> throw new NotImplementedException();
#endif
public static implicit operator IntPtr(Graph graph) public static implicit operator IntPtr(Graph graph)
{ {
return graph._handle; return graph._handle;


Loading…
Cancel
Save