diff --git a/src/TensorFlowNET.Core/Session.cs b/src/TensorFlowNET.Core/Session.cs new file mode 100644 index 00000000..b8ae6544 --- /dev/null +++ b/src/TensorFlowNET.Core/Session.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TensorFlowNET.Core +{ + public class Session + { + } +} diff --git a/src/TensorFlowNET.Core/Status.cs b/src/TensorFlowNET.Core/Status.cs index d9bd90ea..c6a5091f 100644 --- a/src/TensorFlowNET.Core/Status.cs +++ b/src/TensorFlowNET.Core/Status.cs @@ -10,8 +10,14 @@ namespace TensorFlowNET.Core private IntPtr _handle; public IntPtr Handle => _handle; - public string ErrorMessage => c_api.TF_Message(_handle); + /// + /// Error message + /// + public string Message => c_api.TF_Message(_handle); + /// + /// Error code + /// public TF_Code Code => c_api.TF_GetCode(_handle); public Status() diff --git a/src/TensorFlowNET.Core/Tensorflow.cs b/src/TensorFlowNET.Core/Tensorflow.cs index 233019a5..bfea4a4b 100644 --- a/src/TensorFlowNET.Core/Tensorflow.cs +++ b/src/TensorFlowNET.Core/Tensorflow.cs @@ -51,5 +51,10 @@ namespace TensorFlowNET.Core Graph g = new Graph(c_api.TF_NewGraph()); return g; } + + public static Session Session() + { + return new Session(); + } } } diff --git a/test/TensorFlowNET.Examples/HelloWorld.cs b/test/TensorFlowNET.Examples/HelloWorld.cs index a32700e4..31328bb8 100644 --- a/test/TensorFlowNET.Examples/HelloWorld.cs +++ b/test/TensorFlowNET.Examples/HelloWorld.cs @@ -18,12 +18,10 @@ namespace TensorFlowNET.Examples The value returned by the constructor represents the output of the Constant op.*/ - var graph = tf.get_default_graph(); - var hello = tf.constant(4.0); - //var hello = tf.constant("Hello, TensorFlow!"); + var hello = tf.constant("Hello, TensorFlow!"); // Start tf session - // var sess = tf.Session(); + var sess = tf.Session(); } } }