Merge pull request #27506 from ANSHUMAN87:comparison-bug-fix

PiperOrigin-RevId: 242246604
This commit is contained in:
TensorFlower Gardener 2019-04-05 22:56:19 -07:00
commit f0cccb0705

View File

@ -37,9 +37,8 @@ TfLiteStatus ComparisonPrepare(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input2 = GetInput(context, node, kInputTensor2);
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
// Don't support string and bool.
TF_LITE_ENSURE(context,
input1->type != kTfLiteString || input1->type != kTfLiteBool);
// Don't support string.
TF_LITE_ENSURE(context, input1->type != kTfLiteString);
// Currently only support tensors have the same type.
TF_LITE_ENSURE_TYPES_EQ(context, input1->type, input2->type);
output->type = kTfLiteBool;