Changed pad data type (#2354)
authorLiubov Batanina <liubov.batanina@intel.com>
Wed, 23 Sep 2020 10:10:58 +0000 (13:10 +0300)
committerGitHub <noreply@github.com>
Wed, 23 Sep 2020 10:10:58 +0000 (13:10 +0300)
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/pad.cpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pad.hpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/pad.cpp
inference-engine/tests/ngraph_functions/include/ngraph_functions/builders.hpp
inference-engine/tests/ngraph_functions/src/pad.cpp

index fb975e8..bc24764 100644 (file)
@@ -14,8 +14,8 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {
         InferenceEngine::Precision::FP16
 };
 
-const std::vector<std::vector<size_t>> padsBegin2D = {{0, 0}, {1, 1}, {2, 0}, {0, 3}};
-const std::vector<std::vector<size_t>> padsEnd2D   = {{0, 0}, {1, 1}, {0, 1}, {3, 2}};
+const std::vector<std::vector<int64_t>> padsBegin2D = {{0, 0}, {1, 1}, {2, 0}, {0, 3}};
+const std::vector<std::vector<int64_t>> padsEnd2D   = {{0, 0}, {1, 1}, {0, 1}, {3, 2}};
 const std::vector<float> argPadValue = {0.f, 1.f, 2.f, -1.f};
 
 const std::vector<ngraph::helpers::PadMode> padMode = {
@@ -57,8 +57,8 @@ INSTANTIATE_TEST_CASE_P(
         PadLayerTest::getTestCaseName
 );
 
-const std::vector<std::vector<size_t>> padsBegin4D = {{0, 0, 0, 0}, {1, 1, 1, 1}, {2, 0, 1, 0}, {0, 3, 0, 1}};
-const std::vector<std::vector<size_t>> padsEnd4D   = {{0, 0, 0, 0}, {1, 1, 1, 1}, {2, 0, 0, 1}, {1, 3, 2, 0}};
+const std::vector<std::vector<int64_t>> padsBegin4D = {{0, 0, 0, 0}, {1, 1, 1, 1}, {2, 0, 1, 0}, {0, 3, 0, 1}};
+const std::vector<std::vector<int64_t>> padsEnd4D   = {{0, 0, 0, 0}, {1, 1, 1, 1}, {2, 0, 0, 1}, {1, 3, 2, 0}};
 
 const auto pad4DConstparams = testing::Combine(
         testing::ValuesIn(padsBegin4D),
index 1173926..b31f1b1 100644 (file)
@@ -13,8 +13,8 @@
 #include "ngraph_functions/builders.hpp"
 
 typedef std::tuple<
-        InferenceEngine::SizeVector,   // padsBegin
-        InferenceEngine::SizeVector,   // padsEnd
+        std::vector<int64_t>,          // padsBegin
+        std::vector<int64_t>,          // padsEnd
         float,                         // argPadValue
         ngraph::helpers::PadMode,      // padMode
         InferenceEngine::Precision,    // Net precision
index 9685590..98fb612 100644 (file)
@@ -15,7 +15,8 @@ namespace LayerTestsDefinitions {
 
 std::string PadLayerTest::getTestCaseName(testing::TestParamInfo<padLayerTestParamsSet> obj) {
     InferenceEngine::Precision netPrecision;
-    InferenceEngine::SizeVector inputShapes, padsBegin, padsEnd;
+    InferenceEngine::SizeVector inputShapes;
+    std::vector<int64_t> padsBegin, padsEnd;
     ngraph::helpers::PadMode padMode;
     float argPadValue;
     std::string targetDevice;
@@ -35,7 +36,8 @@ std::string PadLayerTest::getTestCaseName(testing::TestParamInfo<padLayerTestPar
 }
 
 void PadLayerTest::SetUp() {
-    InferenceEngine::SizeVector inputShape, padsBegin, padsEnd;
+    InferenceEngine::SizeVector inputShape;
+    std::vector<int64_t> padsBegin, padsEnd;
     float argPadValue;
     ngraph::helpers::PadMode padMode;
     InferenceEngine::Precision netPrecision;
index ee0e1f0..12b20cc 100644 (file)
@@ -385,8 +385,8 @@ std::shared_ptr<ngraph::Node> makeConcat(const std::vector<ngraph::Output<Node>>
                                          const int& axis);
 
 std::shared_ptr<ngraph::Node> makePad(const ngraph::Output<Node>& data,
-                                      const std::vector<size_t>& padsBegin,
-                                      const std::vector<size_t>& padsEnd,
+                                      const std::vector<int64_t>& padsBegin,
+                                      const std::vector<int64_t>& padsEnd,
                                       float argPadValue,
                                       ngraph::helpers::PadMode padMode);
 
index 3ea39c5..89a6469 100644 (file)
@@ -10,8 +10,8 @@
 namespace ngraph {
 namespace builder {
 std::shared_ptr<ngraph::Node> makePad(const ngraph::Output<Node>& data,
-                                      const std::vector<size_t>& padsBegin,
-                                      const std::vector<size_t>& padsEnd,
+                                      const std::vector<int64_t>& padsBegin,
+                                      const std::vector<int64_t>& padsEnd,
                                       float argPadValue,
                                       ngraph::helpers::PadMode padMode) {
     ngraph::op::PadMode pad_mode;