Skip to content
Permalink
Browse files Browse the repository at this point in the history
[lite] Add validation check for dilation height/width to be positive …
…integers.

PiperOrigin-RevId: 416429178
Change-Id: If7cdcddca54486434d9b2f06e7e2b401d7c3ee25
  • Loading branch information
karimnosseir authored and tensorflower-gardener committed Dec 15, 2021
1 parent ece78f4 commit e5b0eec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tensorflow/lite/kernels/depthwise_conv.cc
Expand Up @@ -115,6 +115,8 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {

TF_LITE_ENSURE_EQ(context, NumDimensions(input), 4);
TF_LITE_ENSURE_EQ(context, NumDimensions(filter), 4);
TF_LITE_ENSURE(context, params->dilation_height_factor > 0);
TF_LITE_ENSURE(context, params->dilation_width_factor > 0);

const TfLiteType data_type = input->type;

Expand Down

0 comments on commit e5b0eec

Please sign in to comment.