aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/cwise_op_tanh.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-04-15 04:56:05 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-04-15 06:02:54 -0700
commit31fd4868711f393bec74200231c2936bf3df079a (patch)
tree6cce655cc9690f232dbfd0725c7175e8d333f8bd /tensorflow/core/kernels/cwise_op_tanh.cc
parentdf15baa9b10a0b2d194181dff7ee14bff70d9b8f (diff)
fp16-enable all the componentwise ops.
This also includes updating parts of the Python test framework to handle fp16. fp16 is too inaccurate to do numerical gradients unless a lot of care is taken, so for fp16, we compare fp16 theoretical gradients to fp32 numerical ones. This means that the gradient check doesn't also implicitly test the function itself, so we will need to rely on the numpy tests for those. Change: 119948035
Diffstat (limited to 'tensorflow/core/kernels/cwise_op_tanh.cc')
-rw-r--r--tensorflow/core/kernels/cwise_op_tanh.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/core/kernels/cwise_op_tanh.cc b/tensorflow/core/kernels/cwise_op_tanh.cc
index 5cc45f7bb4..a4cbb150a0 100644
--- a/tensorflow/core/kernels/cwise_op_tanh.cc
+++ b/tensorflow/core/kernels/cwise_op_tanh.cc
@@ -16,8 +16,9 @@ limitations under the License.
#include "tensorflow/core/kernels/cwise_ops_common.h"
namespace tensorflow {
-REGISTER3(UnaryOp, CPU, "Tanh", functor::tanh, float, double, complex64);
+REGISTER4(UnaryOp, CPU, "Tanh", functor::tanh, Eigen::half, float, double,
+ complex64);
#if GOOGLE_CUDA
-REGISTER2(UnaryOp, GPU, "Tanh", functor::tanh, float, double);
+REGISTER3(UnaryOp, GPU, "Tanh", functor::tanh, Eigen::half, float, double);
#endif
} // namespace tensorflow