1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Fix lifetime of networks which are loaded from Model Optimizer IRs

This commit is contained in:
Dmitry Kurtaev
2018-08-29 13:26:43 +03:00
parent 50b61668e2
commit 4062ef5fcb
3 changed files with 3 additions and 4 deletions
+1
View File
@@ -161,6 +161,7 @@ InfEngineBackendNet::InfEngineBackendNet(InferenceEngine::CNNNetwork& net)
inputs = net.getInputsInfo();
outputs = net.getOutputsInfo();
layers.resize(net.layerCount()); // A hack to execute InfEngineBackendNet::layerCount correctly.
netOwner = net;
}
void InfEngineBackendNet::Release() noexcept
+2
View File
@@ -131,6 +131,8 @@ private:
InferenceEngine::InferencePlugin plugin;
InferenceEngine::ExecutableNetwork netExec;
InferenceEngine::InferRequest infRequest;
// In case of models from Model Optimizer we need to manage their lifetime.
InferenceEngine::CNNNetwork netOwner;
std::string name;