[ngraph] Fix compare functions for functional tests (#3161)
authorAleksandr Pertovsky <aleksandr.pertovsky@intel.com>
Tue, 17 Nov 2020 08:32:52 +0000 (11:32 +0300)
committerGitHub <noreply@github.com>
Tue, 17 Nov 2020 08:32:52 +0000 (11:32 +0300)
inference-engine/tests/functional/inference_engine/lp_transformations/add_transformation.cpp
inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp

index dd82574..b66d0f1 100644 (file)
@@ -115,7 +115,7 @@ public:
             testValues.expected.dequantization2,
             testValues.expected.dequantizationAfter,
             // Constant operations after transformations are on 1 input only
-            testValues.constInput == 0 ? 1 : -1,
+            testValues.constInput == -1 ? -1 : 1,
             testValues.expected.constValues,
             testValues.additionalLayer,
             testValues.expected.operationType);
index d24f45b..6e7dc4d 100644 (file)
@@ -40,7 +40,7 @@ bool compareTypeInfo(const ngraph::DiscreteTypeInfo& info1, const ngraph::Discre
 
     const std::string info1Name = isTypeRelaxed(info1.name) && (info1.parent != nullptr) ? info1.parent->name : info1.name;
     const std::string info2Name = isTypeRelaxed(info2.name) && (info2.parent != nullptr) ? info2.parent->name : info2.name;
-    return info1Name == info1Name;
+    return info1Name == info2Name;
 }
 
 bool compare_rt_keys(const std::shared_ptr<ngraph::Node>& node1, const std::shared_ptr<ngraph::Node>& node2) {