mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #16354 from dkurt:dnn_ie_custom_cpu_layers
This commit is contained in:
commit
f6a8f7859c
@ -323,7 +323,14 @@ void InfEngineNgraphNet::initPlugin(InferenceEngine::CNNNetwork& net)
|
|||||||
}
|
}
|
||||||
// Some of networks can work without a library of extra layers.
|
// Some of networks can work without a library of extra layers.
|
||||||
// OpenCV fallbacks as extensions.
|
// OpenCV fallbacks as extensions.
|
||||||
ie.AddExtension(std::make_shared<InfEngineExtension>(), "CPU");
|
try
|
||||||
|
{
|
||||||
|
ie.AddExtension(std::make_shared<InfEngineExtension>(), "CPU");
|
||||||
|
}
|
||||||
|
catch(const std::exception& e)
|
||||||
|
{
|
||||||
|
CV_LOG_INFO(NULL, "DNN-IE: Can't register OpenCV custom layers extension: " << e.what());
|
||||||
|
}
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// Limit the number of CPU threads.
|
// Limit the number of CPU threads.
|
||||||
if (device_name == "CPU")
|
if (device_name == "CPU")
|
||||||
|
@ -738,7 +738,14 @@ void InfEngineBackendNet::initPlugin(InferenceEngine::CNNNetwork& net)
|
|||||||
// Some of networks can work without a library of extra layers.
|
// Some of networks can work without a library of extra layers.
|
||||||
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2019R1)
|
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2019R1)
|
||||||
// OpenCV fallbacks as extensions.
|
// OpenCV fallbacks as extensions.
|
||||||
ie.AddExtension(std::make_shared<InfEngineExtension>(), "CPU");
|
try
|
||||||
|
{
|
||||||
|
ie.AddExtension(std::make_shared<InfEngineExtension>(), "CPU");
|
||||||
|
}
|
||||||
|
catch(const std::exception& e)
|
||||||
|
{
|
||||||
|
CV_LOG_INFO(NULL, "DNN-IE: Can't register OpenCV custom layers extension: " << e.what());
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// Limit the number of CPU threads.
|
// Limit the number of CPU threads.
|
||||||
|
Loading…
Reference in New Issue
Block a user