aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/python_api.h
diff options
context:
space:
mode:
authorGravatar Skye Wanderman-Milne <skyewm@google.com>2018-02-21 14:56:13 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-21 15:00:20 -0800
commit3c3da104f14709dd0495c5ae0783b69e7da21fb9 (patch)
treeea8b67699404eca1be5193aa8a31ace5b5ff05e6 /tensorflow/c/python_api.h
parent8017c247c84c4c80fa11744b1b913aec3ee88f3e (diff)
Don't require shape functions when creating ops from Python using the C API.
There are many ops out there without shape functions, and it's very onerous to add UnknownShape to all of them. PiperOrigin-RevId: 186524294
Diffstat (limited to 'tensorflow/c/python_api.h')
-rw-r--r--tensorflow/c/python_api.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/c/python_api.h b/tensorflow/c/python_api.h
index aa9d9e06b2..542d70f42c 100644
--- a/tensorflow/c/python_api.h
+++ b/tensorflow/c/python_api.h
@@ -37,6 +37,10 @@ void UpdateEdge(TF_Graph* graph, TF_Output new_src, TF_Input dst,
void RemoveAllControlInputs(TF_Graph* graph, TF_Operation* op);
+// Sets whether ops missing a shape inference function should trigger an
+// error. The default is true.
+void SetRequireShapeInferenceFns(TF_Graph* graph, bool require);
+
} // namespace tensorflow
#endif // TENSORFLOW_C_PYTHON_API_H_