diff --git a/tensorflow/lite/micro/kernels/conv.cc b/tensorflow/lite/micro/kernels/conv.cc index ac5c33826b2..c3bccbf6be4 100644 --- a/tensorflow/lite/micro/kernels/conv.cc +++ b/tensorflow/lite/micro/kernels/conv.cc @@ -232,6 +232,7 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE(context, affine_quantization->zero_point); // Conv is quantized along dimension 0: // https://www.tensorflow.org/lite/performance/quantization_spec + TF_LITE_ENSURE_EQ(context, affine_quantization->quantized_dimension, 0); TF_LITE_ENSURE_EQ(context, filter->dims->data[0], affine_quantization->scale->size); TF_LITE_ENSURE_EQ(context, filter->dims->data[0], diff --git a/tensorflow/lite/micro/kernels/depthwise_conv.cc b/tensorflow/lite/micro/kernels/depthwise_conv.cc index c440990026d..3f6de5fca0d 100644 --- a/tensorflow/lite/micro/kernels/depthwise_conv.cc +++ b/tensorflow/lite/micro/kernels/depthwise_conv.cc @@ -224,6 +224,7 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE(context, affine_quantization->zero_point); // Depthwise conv is quantized along dimension 3: // https://www.tensorflow.org/lite/performance/quantization_spec + TF_LITE_ENSURE_EQ(context, affine_quantization->quantized_dimension, 3); TF_LITE_ENSURE_EQ(context, filter->dims->data[3], affine_quantization->scale->size); TF_LITE_ENSURE_EQ(context, filter->dims->data[3],