diff options
author | Suharsh Sivakumar <suharshs@google.com> | 2018-09-26 10:33:45 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-26 10:37:15 -0700 |
commit | 5cedb0427bd4db4117182da8bc0680dd555b4f49 (patch) | |
tree | afa62fc4827667cad5d547aa8866cbf58fe85122 /tensorflow/contrib/lite/kernels | |
parent | a8203086b9bd0a4cd874e42aead0758a3365c387 (diff) |
Add checks for dilation_rate.
PiperOrigin-RevId: 214627202
Diffstat (limited to 'tensorflow/contrib/lite/kernels')
-rw-r--r-- | tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h b/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h index f892b8f661..a70545599b 100644 --- a/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h +++ b/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h @@ -1701,6 +1701,8 @@ inline void DepthwiseConv( const int output_shift = params.output_shift; const int dilation_width_factor = params.dilation_width_factor; const int dilation_height_factor = params.dilation_height_factor; + TFLITE_DCHECK_GE(dilation_width_factor, 1); + TFLITE_DCHECK_GE(dilation_height_factor, 1); TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 4); TFLITE_DCHECK_EQ(filter_shape.DimensionsCount(), 4); TFLITE_DCHECK_EQ(output_shape.DimensionsCount(), 4); |