mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Move Inference Engine to new API
This commit is contained in:
@@ -371,6 +371,13 @@ public:
|
||||
virtual Ptr<BackendNode> initInfEngine(const std::vector<Ptr<BackendWrapper> >&) CV_OVERRIDE
|
||||
{
|
||||
#ifdef HAVE_INF_ENGINE
|
||||
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2018R5)
|
||||
InferenceEngine::Builder::MVNLayer ieLayer(name);
|
||||
ieLayer.setAcrossChannels(acrossChannels);
|
||||
ieLayer.setNormalize(normVariance);
|
||||
ieLayer.setEpsilon(eps);
|
||||
return Ptr<BackendNode>(new InfEngineBackendNode(ieLayer));
|
||||
#else
|
||||
InferenceEngine::LayerParams lp;
|
||||
lp.name = name;
|
||||
lp.type = "MVN";
|
||||
@@ -380,6 +387,7 @@ public:
|
||||
ieLayer->params["normalize_variance"] = normVariance ? "1" : "0";
|
||||
ieLayer->params["eps"] = format("%f", eps);
|
||||
return Ptr<BackendNode>(new InfEngineBackendNode(ieLayer));
|
||||
#endif
|
||||
#endif // HAVE_INF_ENGINE
|
||||
return Ptr<BackendNode>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user