aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/lookup_interface.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/framework/lookup_interface.cc')
-rw-r--r--tensorflow/core/framework/lookup_interface.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/tensorflow/core/framework/lookup_interface.cc b/tensorflow/core/framework/lookup_interface.cc
index bf3204ea6e..117adbf65c 100644
--- a/tensorflow/core/framework/lookup_interface.cc
+++ b/tensorflow/core/framework/lookup_interface.cc
@@ -71,6 +71,14 @@ Status LookupInterface::CheckKeyAndValueTensorsForImport(const Tensor& keys,
return CheckKeyAndValueTensorsHelper(keys, values);
}
+Status LookupInterface::CheckKeyTensorForRemove(const Tensor& keys) {
+ if (keys.dtype() != key_dtype()) {
+ return errors::InvalidArgument("Key must be type ", key_dtype(),
+ " but got ", keys.dtype());
+ }
+ return CheckKeyShape(keys.shape());
+}
+
Status LookupInterface::CheckFindArguments(const Tensor& key,
const Tensor& default_value) {
TF_RETURN_IF_ERROR(CheckKeyAndValueTypes(key, default_value));