aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/resize_bilinear_op.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/kernels/resize_bilinear_op.cc')
-rw-r--r--tensorflow/core/kernels/resize_bilinear_op.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/tensorflow/core/kernels/resize_bilinear_op.cc b/tensorflow/core/kernels/resize_bilinear_op.cc
index d9cb993a4b..dde59e8e74 100644
--- a/tensorflow/core/kernels/resize_bilinear_op.cc
+++ b/tensorflow/core/kernels/resize_bilinear_op.cc
@@ -51,9 +51,8 @@ class ResizeBilinearOp : public OpKernel {
// Return if the output is empty.
if (st.output->NumElements() == 0) return;
- typename TTypes<T, 4>::ConstTensor image_data = input.tensor<T, 4>();
- typename TTypes<float, 4>::Tensor output_data =
- st.output->tensor<float, 4>();
+ typename TTypes<T, 4>::ConstTensor image_data(input.tensor<T, 4>());
+ TTypes<float, 4>::Tensor output_data = st.output->tensor<float, 4>();
functor::ResizeBilinear<Device, T>()(context->eigen_device<Device>(),
image_data, st.height_scale,
@@ -258,9 +257,8 @@ class ResizeBilinearOpGrad : public OpKernel {
if (!context->status().ok()) return;
- typename TTypes<float, 4>::ConstTensor input_grad =
- input.tensor<float, 4>();
- typename TTypes<T, 4>::Tensor output_grad = st.output->tensor<T, 4>();
+ TTypes<float, 4>::ConstTensor input_grad = input.tensor<float, 4>();
+ typename TTypes<T, 4>::Tensor output_grad(st.output->tensor<T, 4>());
functor::ResizeBilinearGrad<Device, T>()(context->eigen_device<Device>(),
input_grad, st.height_scale,