aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/cwise_op_add.cc
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2016-01-08 16:01:08 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2016-01-08 16:01:08 -0800
commit7116cc8b39c432f64e6e82b5708d2773f3fec159 (patch)
tree060611ef5a557efa2b9d9e43110f394a2f267757 /tensorflow/core/kernels/cwise_op_add.cc
parentcd7e98bde1107b0ba39695fded228b98563073b7 (diff)
Register tf.add() for strings, with concatenation (and broadcasting) semantics.
This matches the behavior of numpy, for arrays of objects: >>> x = np.array(["foo", "bar"], dtype=np.object) >>> y = np.array(["baz", "quux"], dtype=np.object) array(['foobaz', 'barquux'], dtype=object) Change: 111732290
Diffstat (limited to 'tensorflow/core/kernels/cwise_op_add.cc')
-rw-r--r--tensorflow/core/kernels/cwise_op_add.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/kernels/cwise_op_add.cc b/tensorflow/core/kernels/cwise_op_add.cc
index 67a7c02daf..49d9e0c507 100644
--- a/tensorflow/core/kernels/cwise_op_add.cc
+++ b/tensorflow/core/kernels/cwise_op_add.cc
@@ -16,8 +16,8 @@ limitations under the License.
#include "tensorflow/core/kernels/cwise_ops_common.h"
namespace tensorflow {
-REGISTER7(BinaryOp, CPU, "Add", functor::add, float, double, int32, int64, int8,
- int16, complex64);
+REGISTER8(BinaryOp, CPU, "Add", functor::add, float, double, int32, int64, int8,
+ int16, complex64, string);
#if GOOGLE_CUDA
REGISTER3(BinaryOp, GPU, "Add", functor::add, float, double, int64);
#endif