aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-10-05 08:34:28 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-05 08:39:04 -0700
commitcea6b4959152981ab778001f30ff9ad87bb4fc9e (patch)
treef4f1406903169d6ac1d20d6bf9af3c9659473bdd
parent388ed2929ea024adcfb76ea9ddd78a38a87470b7 (diff)
Relax some unnecessary 4D array restrictions
PiperOrigin-RevId: 215910400
-rw-r--r--tensorflow/contrib/lite/kernels/internal/types.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/kernels/internal/types.h b/tensorflow/contrib/lite/kernels/internal/types.h
index 64a39dd2a2..c6bc6074d4 100644
--- a/tensorflow/contrib/lite/kernels/internal/types.h
+++ b/tensorflow/contrib/lite/kernels/internal/types.h
@@ -268,8 +268,9 @@ class RuntimeShape {
// This creates a shape padded to the desired size with the specified value.
RuntimeShape(int new_shape_size, const RuntimeShape& shape, int pad_value)
: size_(0) {
+ // If the following check fails, it is likely because a 4D-only kernel is
+ // being used with an array of larger dimension count.
TFLITE_CHECK_GE(new_shape_size, shape.DimensionsCount());
- TFLITE_CHECK_LE(new_shape_size, kMaxSmallSize);
Resize(new_shape_size);
const int size_increase = new_shape_size - shape.DimensionsCount();
for (int i = 0; i < size_increase; ++i) {