aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_api_experimental.h
diff options
context:
space:
mode:
authorGravatar Mingsheng Hong <hongm@google.com>2018-03-22 20:51:51 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-22 20:54:37 -0700
commit0191d264a6e3da12ff7db5ba8002fed6356f071b (patch)
tree1e974458c633f2f64e3a6d6165e66905c7605083 /tensorflow/c/c_api_experimental.h
parent72f48771ea4fce68af893bcda862ca390a0e6b70 (diff)
Added experimental C APIs to build a hard-coded stack of dataset + iterator.
PiperOrigin-RevId: 190170332
Diffstat (limited to 'tensorflow/c/c_api_experimental.h')
-rw-r--r--tensorflow/c/c_api_experimental.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/tensorflow/c/c_api_experimental.h b/tensorflow/c/c_api_experimental.h
index f069398bbb..2fa232878c 100644
--- a/tensorflow/c/c_api_experimental.h
+++ b/tensorflow/c/c_api_experimental.h
@@ -87,6 +87,26 @@ TF_CAPI_EXPORT extern const char* TF_GraphDebugString(TF_Graph* graph,
TF_CAPI_EXPORT extern const char* TF_GraphDebugString(TF_Graph* graph,
size_t* len);
+// Creates a stack of data set + iterator nodes reading the TFRecord files from
+// `file_path`, and outputs the following info on success:
+//
+// 1. Returns the IteratorGetNext node, which caller can run or feed into an
+// node.
+//
+// 2. Sets `dataset_func` to the created function that encapsulates the data set
+// nodes. Caller owns that function, and must call TF_DeleteFunction() on it.
+//
+//
+// The nodes are currently hard-coded to return a single Int32 of value 1.
+// TODO(hongm): Extend the API to allow customization of the nodes created.
+TF_CAPI_EXPORT extern TF_Operation* TF_MakeIteratorGetNextWithDatasets(
+ TF_Graph* graph, const char* file_path, TF_Function** dataset_func,
+ TF_Status* status);
+
+// Returns the shape proto of shape {}.
+TF_CAPI_EXPORT extern void TF_GetAttrScalarTensorShapeProto(TF_Buffer* value,
+ TF_Status* status);
+
#ifdef __cplusplus
} /* end extern "C" */
#endif