@@ -0,0 +1,10 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace TensorFlowNET.Core | |||||
{ | |||||
public class Session | |||||
{ | |||||
} | |||||
} |
@@ -10,8 +10,14 @@ namespace TensorFlowNET.Core | |||||
private IntPtr _handle; | private IntPtr _handle; | ||||
public IntPtr Handle => _handle; | public IntPtr Handle => _handle; | ||||
public string ErrorMessage => c_api.TF_Message(_handle); | |||||
/// <summary> | |||||
/// Error message | |||||
/// </summary> | |||||
public string Message => c_api.TF_Message(_handle); | |||||
/// <summary> | |||||
/// Error code | |||||
/// </summary> | |||||
public TF_Code Code => c_api.TF_GetCode(_handle); | public TF_Code Code => c_api.TF_GetCode(_handle); | ||||
public Status() | public Status() | ||||
@@ -51,5 +51,10 @@ namespace TensorFlowNET.Core | |||||
Graph g = new Graph(c_api.TF_NewGraph()); | Graph g = new Graph(c_api.TF_NewGraph()); | ||||
return g; | return g; | ||||
} | } | ||||
public static Session Session() | |||||
{ | |||||
return new Session(); | |||||
} | |||||
} | } | ||||
} | } |
@@ -18,12 +18,10 @@ namespace TensorFlowNET.Examples | |||||
The value returned by the constructor represents the output | The value returned by the constructor represents the output | ||||
of the Constant op.*/ | 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 | // Start tf session | ||||
// var sess = tf.Session(); | |||||
var sess = tf.Session(); | |||||
} | } | ||||
} | } | ||||
} | } |