aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_api_internal.h
diff options
context:
space:
mode:
authorGravatar Skye Wanderman-Milne <skyewm@google.com>2017-12-12 10:58:31 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-12 11:02:23 -0800
commit968da4bf2722b1303cc223e8342357d62c27dfc1 (patch)
treedab12578913f6bfc11b50d92f39ae95fd7301963 /tensorflow/c/c_api_internal.h
parentc8a5ffdeb2a17df2d2822c7a6df8a44f3ab85614 (diff)
Raise exception on missing unused input_map keys with C API enabled.
Without this change, the C++ ImportGraphDef API returns unused input_map keys (which are plumbed through to the C API as well). However, the Python import_graph_def API requires slightly different semantics: it throws an error for unused input_map keys that are missing from the GraphDef. This change modifies the C and C++ APIs to limit the returned keys to those missing from the GraphDef, and plumbs this through to the C API-enabled import_graph_def implementation. Note that this is a change to the existing C API. Luckily the modified method hasn't been released yet, so it's ok to change it. PiperOrigin-RevId: 178783957
Diffstat (limited to 'tensorflow/c/c_api_internal.h')
-rw-r--r--tensorflow/c/c_api_internal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/c/c_api_internal.h b/tensorflow/c/c_api_internal.h
index aac333d9e2..6df77a7f9b 100644
--- a/tensorflow/c/c_api_internal.h
+++ b/tensorflow/c/c_api_internal.h
@@ -143,11 +143,11 @@ struct TF_ImportGraphDefOptions {
struct TF_ImportGraphDefResults {
std::vector<TF_Output> return_tensors;
std::vector<TF_Operation*> return_nodes;
- std::vector<const char*> unused_key_names;
- std::vector<int> unused_key_indexes;
+ std::vector<const char*> missing_unused_key_names;
+ std::vector<int> missing_unused_key_indexes;
- // Backing memory for unused_key_names values.
- std::list<tensorflow::string> unused_key_names_data;
+ // Backing memory for missing_unused_key_names values.
+ std::list<tensorflow::string> missing_unused_key_names_data;
};
struct TF_DeviceList {