aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/fractional_max_pool_op.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-09-08 17:40:18 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-09-08 18:47:58 -0700
commit0822c9393ab0610311c954ec370b5a8fe2397af7 (patch)
treebb4256ee8aff7d0e8df7ae57868ebe8bef25c48c /tensorflow/core/kernels/fractional_max_pool_op.cc
parent75c7fe196780972efa527874ea2f960709dbfee1 (diff)
Switch fractional avg+max pool shape fns to use C++ shape fns. Add those C++
shape functions. Change: 132627545
Diffstat (limited to 'tensorflow/core/kernels/fractional_max_pool_op.cc')
-rw-r--r--tensorflow/core/kernels/fractional_max_pool_op.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/fractional_max_pool_op.cc b/tensorflow/core/kernels/fractional_max_pool_op.cc
index 482491b504..a422433ecf 100644
--- a/tensorflow/core/kernels/fractional_max_pool_op.cc
+++ b/tensorflow/core/kernels/fractional_max_pool_op.cc
@@ -72,6 +72,8 @@ class FractionalMaxPoolOp : public OpKernel {
}
// Output size.
for (int i = 0; i < tensor_in_and_out_dims; ++i) {
+ // This must match the same logic in the shape function in
+ // core/ops/nn_ops.cc.
output_size_.push_back(
static_cast<int>(floor(input_size_[i] / pooling_ratio_[i])));
DCHECK_GT(output_size_[i], 0);