Lite: Compare Op bug fix

This commit is contained in:
ANSHUMAN TRIPATHY 2019-04-04 16:53:36 +05:30
parent 3cd3277b81
commit 01042658f5

View File

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