aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_api.h
diff options
context:
space:
mode:
authorGravatar Igor Ganichev <iga@google.com>2017-09-19 14:48:51 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-09-19 14:52:35 -0700
commitd67679f1aee7c037fd9c2ac35121720133cd5bd9 (patch)
treeafbd64028c999013886dab1bbe8b45e55b31810b /tensorflow/c/c_api.h
parent74680a3904f88238f58f9566d8bd8e80c3f9dca4 (diff)
Implement TF_FunctionImportFunctionDef
PiperOrigin-RevId: 169304057
Diffstat (limited to 'tensorflow/c/c_api.h')
-rw-r--r--tensorflow/c/c_api.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/tensorflow/c/c_api.h b/tensorflow/c/c_api.h
index bcb565aec2..ccaaa30041 100644
--- a/tensorflow/c/c_api.h
+++ b/tensorflow/c/c_api.h
@@ -1107,7 +1107,7 @@ TF_CAPI_EXPORT void TF_AddGradients(TF_Graph* g, TF_Output* y, int ny,
// included in explicitly specified body).
//
// Returns:
-// On successful, a newly created TF_Function instance. It must be deleted by
+// On success, a newly created TF_Function instance. It must be deleted by
// calling TF_DeleteFunction.
//
// On failure, null.
@@ -1127,6 +1127,15 @@ TF_CAPI_EXPORT extern void TF_FunctionToFunctionDef(TF_Function* func,
TF_Buffer* output_func_def,
TF_Status* status);
+// Construct and return the function serialized in `func_def`.
+// Returns:
+// On success, a newly created TF_Function instance. It must be deleted by
+// calling TF_DeleteFunction.
+//
+// On failure, null.
+TF_CAPI_EXPORT extern TF_Function* TF_FunctionImportFunctionDef(
+ const TF_Buffer* func_def, TF_Status* status);
+
// Frees the memory used by the `func` struct.
// TF_DeleteFunction is a noop if `func` is null.
// Deleting a function does not remove it from any graphs it was copied to.