From 9220304a54a3d864a1e3fe69a8120b32207c3e4e Mon Sep 17 00:00:00 2001 From: Katherine Tian Date: Wed, 12 Aug 2020 17:44:55 +0000 Subject: [PATCH] minor fixes --- .bazelversion | 2 +- tensorflow/core/kernels/map_kernels.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.bazelversion b/.bazelversion index 4a36342fcab..fd2a01863fd 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -3.0.0 +3.1.0 diff --git a/tensorflow/core/kernels/map_kernels.h b/tensorflow/core/kernels/map_kernels.h index 6b38fe7aee6..29b40eebcd3 100644 --- a/tensorflow/core/kernels/map_kernels.h +++ b/tensorflow/core/kernels/map_kernels.h @@ -152,8 +152,8 @@ class TensorMapErase : public OpKernel { OP_REQUIRES(c, m->tensors().find(key) != m->tensors().end(), errors::InvalidArgument("Trying to erase non-existent item.")); - const Tensor& t = m->tensors().find(key)->second; - c->set_output(1, t); + //const Tensor& t = m->tensors().find(key)->second; + //c->set_output(1, t); TensorMap* output_map = nullptr; OP_REQUIRES_OK(c, ForwardInputOrCreateNewMap(c, 0, 0, *m, &output_map)); @@ -179,7 +179,8 @@ class TensorMapHasKey : public OpKernel { template Status TensorMapBinaryAdd(OpKernelContext* c, const TensorMap& a, const TensorMap& b, TensorMap* out) { - // binary add returns a union of keys, values with keys in the intersection are added + // Binary add returns a map containing the union of keys. + // Values with keys in the intersection are added. out->tensors() = a.tensors(); for (const std::pair& p : b.tensors()) { absl::flat_hash_map::iterator it = out->tensors().find(p.first); @@ -197,7 +198,7 @@ Status TensorMapBinaryAdd(OpKernelContext* c, const TensorMap& a, template Status TensorMapZerosLike(OpKernelContext* c, const TensorMap& x, TensorMap* y) { - // zeros like returns an empty map + // Zeros like returns an empty map. return Status::OK(); }