Adds float64 support for avg pool and its gradient.
authorBrian Patton <bjp@google.com>
Tue, 20 Mar 2018 13:25:19 +0000 (06:25 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 20 Mar 2018 13:29:14 +0000 (06:29 -0700)
commit87b715325a74d34f1331d14d8df640308ec10d12
treef2441ef87bd282de100525ce4fcbe8d9ca849411
parent9183c33884c4492589f2d8648178d00645c30691
Adds float64 support for avg pool and its gradient.

Eigen NumTraits is modified to directly use std::numeric_limits, which resolves a broken test caused by inconsistency between the host and devices values of Eigen::NumTraits<double>::highest(). This returns +inf on device, due to third_party/eigen3/Eigen/src/Core/util/Meta.h, and __DBL_MAX__ (1.7976931348623157e+308) on host, making the behavior for doubles (on device) inconsistent with both the behavior of floats Eigen::NumTraits<float>::highest() and the behavior of std::numeric_limits<double>::max()

PiperOrigin-RevId: 189731521
tensorflow/core/kernels/avgpooling_op.cc
tensorflow/core/kernels/avgpooling_op_gpu.cu.cc
tensorflow/core/kernels/eigen_pooling.h
tensorflow/python/kernel_tests/pooling_ops_test.py