diff options
author | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-27 11:06:15 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-27 11:06:15 -0700 |
commit | 22107ea509d16803f33f723d54d313b9be5622cc (patch) | |
tree | ec4ae56e18e599da2f723c98ffa047478a296a72 | |
parent | e888f2cb5ed6f60526a23063bfb30b27f9233980 (diff) | |
parent | 9249690173fe4bf46f2fc170f3e68f5496d7609c (diff) |
Merge pull request #20671 from yongtang:06052018-tan-complex
PiperOrigin-RevId: 206341656
-rw-r--r-- | tensorflow/cc/gradients/math_grad_test.cc | 6 | ||||
-rw-r--r-- | tensorflow/core/kernels/cwise_op_tan.cc | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/tensorflow/cc/gradients/math_grad_test.cc b/tensorflow/cc/gradients/math_grad_test.cc index fd7b6fe662..1c9bdff5e1 100644 --- a/tensorflow/cc/gradients/math_grad_test.cc +++ b/tensorflow/cc/gradients/math_grad_test.cc @@ -475,11 +475,7 @@ TEST_F(CWiseUnaryGradTest, Tan_Complex) { auto x_fn = [this](const int i) { return CRV({{1, 0}, {0, 1}, {2, -1}, {1, 2}, {3, 4}}); }; - // TODO(kbsriram) - // Enable when tan kernel supports complex inputs - if (false) { - TestCWiseGrad<complex64, complex64>(TAN, x_fn); - } + TestCWiseGrad<complex64, complex64>(TAN, x_fn); } TEST_F(CWiseUnaryGradTest, Atan) { diff --git a/tensorflow/core/kernels/cwise_op_tan.cc b/tensorflow/core/kernels/cwise_op_tan.cc index c1a25767d3..90762fb1b0 100644 --- a/tensorflow/core/kernels/cwise_op_tan.cc +++ b/tensorflow/core/kernels/cwise_op_tan.cc @@ -16,7 +16,8 @@ limitations under the License. #include "tensorflow/core/kernels/cwise_ops_common.h" namespace tensorflow { -REGISTER2(UnaryOp, CPU, "Tan", functor::tan, float, double); +REGISTER4(UnaryOp, CPU, "Tan", functor::tan, float, double, complex64, + complex128); #if GOOGLE_CUDA REGISTER2(UnaryOp, GPU, "Tan", functor::tan, float, double); |