diff --git a/tensorflow/lite/delegates/gpu/common/model_builder.cc b/tensorflow/lite/delegates/gpu/common/model_builder.cc index 32b7506a82c..b616a72378c 100644 --- a/tensorflow/lite/delegates/gpu/common/model_builder.cc +++ b/tensorflow/lite/delegates/gpu/common/model_builder.cc @@ -1240,8 +1240,7 @@ class ElementwiseOperationParser : public TFLiteOperationParser { TfLiteSubParams* tf_options = nullptr; RETURN_IF_ERROR(RetrieveBuiltinData(tflite_node, &tf_options)); RETURN_IF_ERROR(CheckActivationSupported(tf_options->activation)); - } - if (!IsOneArgumentOperation()) { + } else if (!IsOneArgumentOperation()) { return InvalidArgumentError("Incorrect operation type passed"); }