diff options
-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); |