diff options
author | A. Unique TensorFlower <nobody@tensorflow.org> | 2015-12-17 10:27:58 -0800 |
---|---|---|
committer | Vijay Vasudevan <vrv@google.com> | 2015-12-17 10:27:58 -0800 |
commit | f7d938055a08a0786281aace9b3ac03c2cf1314e (patch) | |
tree | 686587f1d2875c6400793f2cfe0449e375304fa6 /tensorflow/core/kernels/resize_bilinear_op.cc | |
parent | 3620d67ad9985d92e409471e8871b07b5daa3488 (diff) |
Validate expectations on parameters.
Change: 110460331
Diffstat (limited to 'tensorflow/core/kernels/resize_bilinear_op.cc')
-rw-r--r-- | tensorflow/core/kernels/resize_bilinear_op.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/resize_bilinear_op.cc b/tensorflow/core/kernels/resize_bilinear_op.cc index b3fa1a1777..1688be42f5 100644 --- a/tensorflow/core/kernels/resize_bilinear_op.cc +++ b/tensorflow/core/kernels/resize_bilinear_op.cc @@ -64,6 +64,11 @@ class ResizeBilinearOp : public OpKernel { const int64 channels = input.dim_size(3); const int64 out_height = output->dim_size(1); const int64 out_width = output->dim_size(2); + CHECK_GT(in_height, 0); + CHECK_GT(in_width, 0); + CHECK_GT(channels, 0); + CHECK_GT(out_height, 0); + CHECK_GT(out_width, 0); typename TTypes<T, 4>::ConstTensor input_data = input.tensor<T, 4>(); typename TTypes<float, 4>::Tensor output_data = output->tensor<float, 4>(); |