aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/kernels/conv.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-06-08 14:14:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-08 14:17:42 -0700
commit77f0772c0ead3e1402615022649aad2a721265fd (patch)
tree34cfc8ecde9a8b50b6bfcf2473739f010b81fcb8 /tensorflow/contrib/lite/kernels/conv.cc
parent70266a65f7fb1d58196eff5355f16d62aba64310 (diff)
Bugfix for dilated_conv optimizations. We were failing to create im2col arrays for dilated unstrided 1x1 cases.
PiperOrigin-RevId: 199849200
Diffstat (limited to 'tensorflow/contrib/lite/kernels/conv.cc')
-rw-r--r--tensorflow/contrib/lite/kernels/conv.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/kernels/conv.cc b/tensorflow/contrib/lite/kernels/conv.cc
index ee42e5cdc8..747c8a62c0 100644
--- a/tensorflow/contrib/lite/kernels/conv.cc
+++ b/tensorflow/contrib/lite/kernels/conv.cc
@@ -134,7 +134,9 @@ static TfLiteStatus AllocateTemporaryTensorsIfRequired(TfLiteContext* context,
// optimized_ops.h, in order to avoid a DCHECK(!im2col_data).
data->need_im2col =
(params->stride_width != 1 || params->stride_height != 1 ||
- filter_width != 1 || filter_height != 1);
+ params->dilation_width_factor != 1 ||
+ params->dilation_height_factor != 1 || filter_width != 1 ||
+ filter_height != 1);
// If we're using the optimized multithreaded EigenTensor implementation of
// convolution, it expects the filter weights to be transposed compared to
// the normal TF Lite buffer format. Typical TF Lite weights are