From 6b20496eb5653dc97805ab2eaadd6b8d4a6a33a3 Mon Sep 17 00:00:00 2001 From: haiping008 Date: Thu, 20 Dec 2018 17:22:35 -0600 Subject: [PATCH] add _FetchHandler --- .../{ => Session}/BaseSession.cs | 7 +++++-- src/TensorFlowNET.Core/{ => Session}/Session.cs | 0 src/TensorFlowNET.Core/Session/_FetchHandler.cs | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) rename src/TensorFlowNET.Core/{ => Session}/BaseSession.cs (92%) rename src/TensorFlowNET.Core/{ => Session}/Session.cs (100%) create mode 100644 src/TensorFlowNET.Core/Session/_FetchHandler.cs diff --git a/src/TensorFlowNET.Core/BaseSession.cs b/src/TensorFlowNET.Core/Session/BaseSession.cs similarity index 92% rename from src/TensorFlowNET.Core/BaseSession.cs rename to src/TensorFlowNET.Core/Session/BaseSession.cs index ffb77c12..f3f06d2c 100644 --- a/src/TensorFlowNET.Core/BaseSession.cs +++ b/src/TensorFlowNET.Core/Session/BaseSession.cs @@ -62,7 +62,10 @@ namespace Tensorflow feed_dict_tensor[feed.Key] = np_val; } } - + + // Create a fetch handler to take care of the structure of fetches. + var fetch_handler = new _FetchHandler(); + var status = new Status(); c_api.TF_SessionRun(_session, @@ -70,7 +73,7 @@ namespace Tensorflow inputs: new TF_Output[] { }, input_values: new IntPtr[] { }, ninputs: 0, - outputs: new TF_Output[] { }, + outputs: new TF_Output[] { new TF_Output() }, output_values: new IntPtr[] { }, noutputs: 1, target_opers: new IntPtr[] { }, diff --git a/src/TensorFlowNET.Core/Session.cs b/src/TensorFlowNET.Core/Session/Session.cs similarity index 100% rename from src/TensorFlowNET.Core/Session.cs rename to src/TensorFlowNET.Core/Session/Session.cs diff --git a/src/TensorFlowNET.Core/Session/_FetchHandler.cs b/src/TensorFlowNET.Core/Session/_FetchHandler.cs new file mode 100644 index 00000000..c4d4d5ee --- /dev/null +++ b/src/TensorFlowNET.Core/Session/_FetchHandler.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tensorflow +{ + /// + /// Handler for structured fetches. + /// + public class _FetchHandler + { + public _FetchHandler(Graph graph, Tensor fetches) + { + + } + } +}