[IE][VPU][GT]: Fix different blobs for the same network (#1738)
authorAndrew Bakalin <andrew.bakalin@intel.com>
Thu, 13 Aug 2020 11:57:10 +0000 (14:57 +0300)
committerGitHub <noreply@github.com>
Thu, 13 Aug 2020 11:57:10 +0000 (14:57 +0300)
* Use vector instead of unordered_map in order to get stable blob serialization.

inference-engine/src/vpu/graph_transformer/include/vpu/frontend/ie_parsed_network.hpp
inference-engine/src/vpu/graph_transformer/src/frontend/ie_parsed_network.cpp

index 3f215f2..7d7c007 100644 (file)
@@ -17,7 +17,7 @@ namespace ie = InferenceEngine;
 struct IeParsedNetwork final {
     ie::InputsDataMap networkInputs;
     ie::OutputsDataMap networkOutputs;
-    std::unordered_map<ie::DataPtr, ie::Blob::Ptr> constDatas;
+    std::vector<std::pair<ie::DataPtr, ie::Blob::Ptr>> constDatas;
     std::vector<ie::CNNLayerPtr> orderedLayers;
 };
 
index 9e6c004..64a8390 100644 (file)
@@ -66,7 +66,7 @@ IeParsedNetwork parseNetwork(const ie::ICNNNetwork& network) {
             const auto constBlob = layer->blobs.begin()->second;
             IE_ASSERT(constBlob != nullptr);
 
-            out.constDatas[constData] = constBlob;
+            out.constDatas.emplace_back(constData, constBlob);
 
             continue;
         }