Merge pull request #30337 from siju-samuel:patch-58

PiperOrigin-RevId: 257002797
This commit is contained in:
TensorFlower Gardener 2019-07-08 11:49:01 -07:00
commit 07323ccf85

View File

@ -38,6 +38,7 @@ TfLiteStatus ResizeOutputImpl(TfLiteContext* context, const TfLiteTensor* dims,
for (int i = 0; i < output_shape->size; ++i) {
T data = GetTensorData<T>(dims)[i];
if (data < 0) {
TfLiteIntArrayFree(output_shape);
context->ReportError(context, "Fill dimensions must be >= 0", dims->type);
return kTfLiteError;
}