aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/ops/lookup_ops.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/ops/lookup_ops.cc')
-rw-r--r--tensorflow/core/ops/lookup_ops.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/tensorflow/core/ops/lookup_ops.cc b/tensorflow/core/ops/lookup_ops.cc
index 72a77be70d..a0987cd982 100644
--- a/tensorflow/core/ops/lookup_ops.cc
+++ b/tensorflow/core/ops/lookup_ops.cc
@@ -214,6 +214,19 @@ REGISTER_OP("LookupTableInsertV2")
return Status::OK();
});
+REGISTER_OP("LookupTableRemoveV2")
+ .Input("table_handle: resource")
+ .Input("keys: Tin")
+ .Attr("Tin: type")
+ .SetShapeFn([](InferenceContext* c) {
+ ShapeHandle handle;
+ TF_RETURN_IF_ERROR(c->WithRank(c->input(0), 0, &handle));
+ TF_RETURN_IF_ERROR(c->WithRankAtLeast(c->input(1), 1, &handle));
+
+ // TODO(turboale): Validate keys shape.
+ return Status::OK();
+ });
+
REGISTER_OP("LookupTableSize")
.Input("table_handle: Ref(string)")
.Output("size: int64")
@@ -407,6 +420,7 @@ REGISTER_OP("MutableDenseHashTable")
REGISTER_OP("MutableDenseHashTableV2")
.Input("empty_key: key_dtype")
+ .Input("deleted_key: key_dtype")
.Output("table_handle: resource")
.Attr("container: string = ''")
.Attr("shared_name: string = ''")