File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/TensorFlowNET.Core/Graphs Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,10 @@ all variables that are created during the construction of a graph. The caller
7575 /// then create a TensorFlow session to run parts of the graph across a set of local and remote devices.
7676 /// </summary>
7777 /// <remarks>https://www.tensorflow.org/guide/graphs <br></br>https://www.tensorflow.org/api_docs/python/tf/Graph</remarks>
78- public partial class Graph : DisposableObject //, IEnumerable<Operation>
78+ public partial class Graph : DisposableObject ,
79+ #if ! SERIALIZABLE
80+ IEnumerable < Operation >
81+ #endif
7982 {
8083 private Dictionary < int , ITensorOrOperation > _nodes_by_id ;
8184 public Dictionary < string , ITensorOrOperation > _nodes_by_name ;
@@ -524,17 +527,19 @@ public override string ToString()
524527 }
525528
526529 return debugString;*/
527- }
528-
529- /*private IEnumerable<Operation> GetEnumerable()
530+ }
531+
532+ #if ! SERIALIZABLE
533+ private IEnumerable < Operation > GetEnumerable ( )
530534 => c_api_util . tf_operations ( this ) ;
531535
532536 IEnumerator < Operation > IEnumerable < Operation > . GetEnumerator ( )
533537 => GetEnumerable ( ) . GetEnumerator ( ) ;
534538
535539 IEnumerator IEnumerable . GetEnumerator ( )
536- => throw new NotImplementedException();*/
537-
540+ => throw new NotImplementedException ( ) ;
541+ #endif
542+
538543 public static implicit operator IntPtr ( Graph graph )
539544 {
540545 return graph . _handle ;
You can’t perform that action at this time.
0 commit comments