Fix lifetime of networks which are loaded from Model Optimizer IRs
This commit is contained in:
parent
50b61668e2
commit
4062ef5fcb
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -177,10 +177,6 @@ TEST_P(DNNTestOpenVINO, models)
|
||||
Target target = (dnn::Target)(int)get<0>(GetParam());
|
||||
std::string modelName = get<1>(GetParam());
|
||||
|
||||
if ((modelName == "semantic-segmentation-adas-0001" && target == DNN_TARGET_OPENCL_FP16) ||
|
||||
(modelName == "vehicle-license-plate-detection-barrier-0106"))
|
||||
throw SkipTestException("");
|
||||
|
||||
std::string precision = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? "FP16" : "FP32";
|
||||
std::string prefix = utils::fs::join("intel_models",
|
||||
utils::fs::join(modelName,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user